In BIRT, how to view different master pages with different parameters [message #1696243] |
Sun, 24 May 2015 11:46 |
Zang Shuyang Messages: 1 Registered: May 2015 |
Junior Member |
|
|
I'm really new to BIRT, right now, I need to solve a problem that I want users can decide which Master page they want to see. For example, if a user want to see the number of vehicles in this period, he can select a parameter in the parameter page, and then click run, then the corresponding master page will be displayed. How can I achieve that, can anyone help me?
I just found some materials online and edited the script to achieve the goal. The code is like this,
rptDesignHandle = reportContext.getReportRunnable().designHandle.getDesignHandle();
tbl = rptDesignHandle.findElement("mytable");
atl = rptDesignHandle.fidnElement("atl");
if(params["Static"].value=="Top 10 busiest routes"){
tbl.setProperty("masterPage","Graph 1");
atl.setProperty("masterPage","Graph 2");
}
if(params["Static"].value=="Top 10 busiest moments"){
tbl.setProperty("masterPage","Graph 1");
atl.setProperty("masterPage","Graph 2");
}
But it's not working, can anyone help me figure out what's wrong with the code? (Btw, in my report, there are only 2 graphs, I just want to show one graph of them each time based on the selection that user made.)
Thanks
|
|
|
|
Powered by
FUDForum. Page generated in 0.02284 seconds