Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » In BIRT, how to view different master pages with different parameters
In BIRT, how to view different master pages with different parameters [message #1696243] Sun, 24 May 2015 11:46 Go to next message
Zang Shuyang is currently offline Zang ShuyangFriend
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
Re: In BIRT, how to view different master pages with different parameters [message #1696331 is a reply to message #1696243] Mon, 25 May 2015 18:35 Go to previous message
Jerry Sheets is currently offline Jerry SheetsFriend
Messages: 76
Registered: July 2009
Location: Salt Lake City, UT
Member
I have used the 'Table, Visibility' property to achieve something similar to what I think you are trying to do.
Previous Topic:Dynamic database adaption
Next Topic:Horizontal table Page Break And aggregations
Goto Forum:
  


Current Time: Thu Apr 25 02:07:23 GMT 2024

Powered by FUDForum. Page generated in 0.02284 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top