| Birt report viewer source: where are GET report parameters set/initialized in source code ? [message #989284] |
Wed, 05 December 2012 09:22  |
nari noori Messages: 28 Registered: November 2012 |
Junior Member |
|
|
Hi,
im working on my company's birt-application.
ive just downloaded the repository with package "org.eclipse.birt.report.viewer" and the corresponding packages.
Im trying to figure out where the GET report parameters are set in the source code.
Reason beeing is that i know its possible to set report-parameters through the report url. like this: myreport.rptdesign&myparam=1
I want to put in my custom code that says that if i have set the parametervalue in the session, set this value on the corresponding birt report parameter.
the reason behind changing the source code, is that it seems that its not possible to set report parameters in script. I know its possible to set parametervalue in each "parameter-script", but i want a generic way of setting parameters.
I greatly appreciate all help.
Thanks.
|
|
|
|
| Re: Birt report viewer source: where are GET report parameters set/initialized in source code ? [message #989378 is a reply to message #989367] |
Wed, 05 December 2012 17:21   |
nari noori Messages: 28 Registered: November 2012 |
Junior Member |
|
|
Thanks for your reply williams.
My aim is that in my web-application give the user the choice of "saving a report". With saving the report i mean:
-the user "saves the report" to a database-table with a custom name, and with report-parameters he choose when he ran the report.
-so when the user later chooses to run the "saved" report, the application gets his pre-set parameters and then runs the report (preferably without showing the report paramater-page)
i know its possible to run the reports with GET-parameters like:myreport.rptdesign&myparam=1 and it works greatly when there are few parameters. But i have some reports with a lot of parameters (some of them multi-value selects) that can give huge urls, if i use GET-parameters. And i know that the browsers have limitations with GET-parameters.
The best solution for running a "saved report" is:
-run query, get "saved report" and its report-parameters with values.
-iterate through the pre-set report-parameters and set the birt report parameters.
-show report result.
Thanks.
[Updated on: Wed, 05 December 2012 17:23] Report message to a moderator
|
|
|
| Re: Birt report viewer source: where are GET report parameters set/initialized in source code ? [message #989576 is a reply to message #989378] |
Thu, 06 December 2012 14:52   |
|
You could save your parameters back to your database or out to a text file or something. Then, when the user wants to run the "saved report", you could pass the parameter values back in, through the session. Then, just hide the parameter screen and set your parameter values in the beforeFactory.
Another option could be to write a "saved report" name back to your database, along with user name, and any other necessary info. Then, when your user info is passed to a report, you could check for "saved reports" and prompt the user if they'd like to load one. The values would be written to text files named by the "saved report" name, so you'd just need to recall the text file, hide the parameter screen, and set the parameters, in the report.
Hope one of these helps.
Regards,
Michael Williams
BIRT Exchange
Michael's BIRT Blog
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03626 seconds