Jump to content
Remitur

Any way to post-process reports?

Recommended Posts

In WHMCS there's available a number of "standard" reports, and you can add also custom reports... (  /admin/reports.php ).

And this is good.

You can also export "exports" report in csv ... and this is good too.

And when you have your csv files, you can process them in whatever way you need/want... and this is good too.

But... does exist any way to do  a postprocessing directly in WHMCS, without the needs to export the csv and process it externally?

That's to say: it's easy to add a button to a certain report, which calls a function which (i.e.) send an email but... how to recover the data in the report and pass it to this function? Is it somehow possible?

 

Share this post


Link to post
Share on other sites
6 hours ago, Remitur said:

But... does exist any way to do  a postprocessing directly in WHMCS, without the needs to export the csv and process it externally?

not out of the box.

6 hours ago, Remitur said:

That's to say: it's easy to add a button to a certain report, which calls a function which (i.e.) send an email but... how to recover the data in the report and pass it to this function? Is it somehow possible?

anything is possible - I know MG's Report Generator addon does it (or something similar)...

you thinking of sending it as a PDF attachment or in the main boy of the email ?

Share this post


Link to post
Share on other sites
On 10/25/2019 at 6:03 PM, brian! said:

you thinking of sending it as a PDF attachment or in the main boy of the email ?

Something even little more difficult... the idea is to get reports data, and somehow transmit it to an external php script (to do some operations required by accounting).
I guess that report data should be in form of an array, but I can't check if it's really so and what's tha name of this array (if any...)

 

Share this post


Link to post
Share on other sites
On 27/10/2019 at 17:39, Remitur said:

Something even little more difficult... the idea is to get reports data, and somehow transmit it to an external php script (to do some operations required by accounting).

i'm not sure if that's more difficult or simpler. 🙂

On 27/10/2019 at 17:39, Remitur said:

I guess that report data should be in form of an array, but I can't check if it's really so and what's tha name of this array (if any...)

possibly you're overcomplicating the situation by thinking of using reports as the source of these results/data - remember, these reports are just a visual way of seeing the results of a SQL query... but if you don't need to see the results and just need to pass the results on to another script, then either write a primary script to run the underlying SQL query locally and export the results in a given format that the second script can then read, or get the external PHP script to query the WHMCS database for the results (either directly or via a custom API call).

Edited by brian!

Share this post


Link to post
Share on other sites
On 10/27/2019 at 6:39 PM, Remitur said:

Something even little more difficult... the idea is to get reports data, and somehow transmit it to an external php script (to do some operations required by accounting).
I guess that report data should be in form of an array, but I can't check if it's really so and what's tha name of this array (if any...)

I could be wrong but I suspect that a module you are using has this feature. It pulls everything your accountant need from database. It's like using an API function of WHMCS.

Share this post


Link to post
Share on other sites
9 hours ago, Kian said:

I could be wrong but I suspect that a module you are using has this feature. It pulls everything your accountant need from database. It's like using an API function of WHMCS.

I wonder which module you could mean.. hmmm! 🤔

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated