Topic: Running reports programmatically

Hello all,

  I was wondering if there is a way to run reports (or any scripts, for that matter) programmatically? (That is, without having to login via the web interface, but rather by passing in credentials in some other way like a GET or POST.)

  I ask because I'd love the ability to write a custom script that generates a number of reports all at once without having to use the web interface, but rather just calling the php scripts directly.

  If this isn't available, could you give direction as to how something like this could be designed/implemented?

  Thanks very much!

~Tom

Re: Running reports programmatically

Yes there is. Have a look in the report itself first to see which parameters are needed.
Then have a look in /reporting/includes/reporting.inc (function print_link) and f.i. /manufacturing/work_order_entry.php (line 62 and 63) to see how to build the parameters.
Finally use the file /reporting/prn_redirect.php for firing the report (the href part inside the link in function print_link).

/Joe

Re: Running reports programmatically

please can some one help show me the steps on how to produce/view reports?
i say so cos i tried viewing even one report but it was not possible.
for example when i tried viewing annual expenses, i got this
TCPDF error: Unable to create output file: ../company/2/pdf_files/4af936b1dbde4.pdf

Re: Running reports programmatically

Please check company/2/pdf_files directory access rights. This should be writable by all.
Janusz

Re: Running reports programmatically

thanks for the quick reply' but please where can i find
company/2/pdf_files directory
am still here for help

Re: Running reports programmatically

please i also went to
setup_create/update company
and i got this as an answer
The security settings on your account do not permit you to access this function
am doubting cos i was given the user name and password of this account and am having full control of it.
what should i do?

Re: Running reports programmatically

If you don't know how to do this, ask your administrator to change the access rights to the company/... folder. This have to be writable by www server.

Setup/Create Company option is accessible only for admins of first registered company, so you will have no access to this when logged into another company, but this have nothing to do with your problem with reports.

Re: Running reports programmatically

i wish to appreciate you for the respond and it did helped to an extend.we treied doing the viewing but the excel page was blank ( having just the company name, date and indicated period ) with the error sign (####) appearing in the report

Re: Running reports programmatically

Which one report was blank?

Re: Running reports programmatically

The #### indicates an overflowed column. Try to enlarge the cells a bit by dragging in the header or doubleclick on the border between cells in the header.

/Joe

Re: Running reports programmatically

am sorry this does not work as you say cos i have enlarge the cells but found nothing in them.
molyko

Re: Running reports programmatically

molyko,

  Perhaps you could send us a screenshot of what you're seeing?  I'm not sure if these forums support images, so you can send it to developers@lists.frontaccounting.eu.

Tom