Run report with parameters

Stimulsoft Reports.PHP discussion
Post Reply
tony.tomov
Posts: 72
Joined: Mon Jun 07, 2010 2:39 am

Run report with parameters

Post by tony.tomov »

Hello,

I have not find a way to perform this:
Basically is it possible when lunch the report for the first time with parameter(s) with user interaction NOT to get the initial data.

The idea is not to perform a database query with the initial parameters, since they always are changed every time.

This will skip heavy requests to server in case of huge database.

P.S. If this is not possible - may I request such feature.

Thank you

Kind Regards,
Tony
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Run report with parameters

Post by Lech Kulikowski »

Hello,

Please try to set the RequestParameters option to true for the report.

Thank you.
tony.tomov
Posts: 72
Joined: Mon Jun 07, 2010 2:39 am

Re: Run report with parameters

Post by tony.tomov »

Hello,

Thank you for the replay.

I think you do not have understand the problem.

To explain it again:

I have a php report with parameters requested from the user.
This report uses SQL datasource to get the data.
When run the report at first time the report make a database query to get initila data based an the defaulr
report parameters.

The question is: Is it possible to ommit the initial database query when load the report initially and the report to be run only when the user fine tune the parameters and click submit with the new one.

Hope it is clear now.

Kind Regards,
Tony
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Run report with parameters

Post by Alex K. »

Hello,

Only one option - if you are using Request From User variables, you can set RequestParameters = true. In this case, the report will be rendered only after filling all parameters and click Submit button.

Thank you.
tony.tomov
Posts: 72
Joined: Mon Jun 07, 2010 2:39 am

Re: Run report with parameters

Post by tony.tomov »

Hello,

Unfortunately this is not working for me. If you want I can send you a demo report.
Attachments
reportparam.zip
Attached a example
(2.59 KiB) Downloaded 332 times
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Run report with parameters

Post by Edward »

Hi Tony,

Thank you for the report template and a sample php page.
There is a simple workaround for this case if you would like to set the initial parameter for the SQL query to some value that would eliminate heavy query execution and a huge amount of data being sent back. Let's say the initial parameter would be a date from 19th century, so no query results is retrieved.
And then, when the report parameters are requested the second and any consecutive report execution, the query would work with the actual data.

Please check the article on how to send the parameters.

https://www.stimulsoft.com/en/samples/p ... -sql-query

Thank you,
Edward
Post Reply