Replace string in various queryText [message #1015055] |
Wed, 27 February 2013 05:12  |
Eclipse User |
|
|
|
Hi all,
i have 3 queries in which i must replace some parameters, i do it in each of the 3 events beforeOpen with the same script, there is a possibility to insert this script only once and replace the parameters in my 3 queries?
Thanks
|
|
|
|
Re: Replace string in various queryText [message #1015390 is a reply to message #1015290] |
Thu, 28 February 2013 08:14   |
Eclipse User |
|
|
|
Michael Williams wrote on Wed, 27 February 2013 23:37Maybe I'm not understanding correctly, but you should be able to use variables or parameters in your beforeOpen script of each dataSet. Then, you'd only have to change the parameter or variable in one place. If I'm misunderstanding, please explain the issue in a little more detail. Thanks!
Hy Michael,
yes you understanding correctly, my requirement is that the script is the same, but the place in which is present no, so if i have to modify the script, then i have to change the various queries.
|
|
|
|
Re: Replace string in various queryText [message #1016029 is a reply to message #1015476] |
Mon, 04 March 2013 11:16  |
Eclipse Guest Messages: 93 Registered: February 2013 Location: Vienna |
Member |
|
|
As I understand it, you should solve your problem with external javascript files. In the report, go to Properties Editor -> Resources -> Javascript Files. There you can add a javascript file which will hold the function to adjust your query. In the beforeOpen() method of your datasets, you can then call the function, providing the query text or whatever parameter you'll need in the query.
Make sure that in BIRT your resource folder is set to the folder where you then put your *.js file (window -> preferences -> report design -> resource -> resource folder
|
|
|
Powered by
FUDForum. Page generated in 0.03772 seconds