Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Master Page or(page orientation) Based on the parameter
Master Page or(page orientation) Based on the parameter [message #551454] Fri, 06 August 2010 14:03 Go to next message
JP Redro is currently offline JP RedroFriend
Messages: 181
Registered: July 2009
Location: India
Senior Member

Hi Experts,

I am experiencing an issue with page orientation , If the Parameter is A4 then i have to chose A4 Master page or it has to took default Master page. Please assist me on this.

Thanks,
JP


Thanks,
JP
Re: Master Page or(page orientation) Based on the parameter [message #551473 is a reply to message #551454] Fri, 06 August 2010 14:23 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

JP,

You can always modify the master page settings in the beforeFactory
script like:

importPackage(Packages.org.eclipse.birt.report.model.api.ele ments);
importPackage(Packages.org.eclipse.birt.report.model.api);

//reportContext.getDesignHandle().findMasterPage("myMasterPage ").orientation
= "landscape";
reportContext.getDesignHandle().findMasterPage("myMasterPage ").orientation
= "portrait";
//reportContext.getDesignHandle().findMasterPage("myMasterPage ").pageType =
"us-legal";
reportContext.getDesignHandle().findMasterPage("myMasterPage ").setProperty("headerHeight",
"0.6in" );
reportContext.getDesignHandle().findMasterPage("myMasterPage ").setProperty("headerHeight",
"0.7in" );

Or in the before factory find your table and set its master page like:

rptDesignHandle = reportContext.getDesignHandle();
tbl = rptDesignHandle.findElement("mytable");
tbl.setProperty("masterPage","MasterPageTwo");

And these can be based on parameters as the beforeFactory event has
access to all the parameter values. ie params["MyParameter"].value

Jason

On 8/6/2010 10:03 AM, JP wrote:
> Hi Experts,
>
> I am experiencing an issue with page orientation , If the Parameter is
> A4 then i have to chose A4 Master page or it has to took default Master
> page. Please assist me on this.
>
> Thanks,
> JP
Re: Master Page or(page orientation) Based on the parameter [message #551488 is a reply to message #551454] Fri, 06 August 2010 15:28 Go to previous messageGo to next message
JP Redro is currently offline JP RedroFriend
Messages: 181
Registered: July 2009
Location: India
Senior Member

Thanks Jason,

Please drop me example rptdesign.

thanks,
JP


Thanks,
JP
Re: Master Page or(page orientation) Based on the parameter [message #551495 is a reply to message #551488] Fri, 06 August 2010 15:51 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

See this example:
http://www.birt-exchange.org/org/devshare/designing-birt-rep orts/1246-set-master-page-properties-using-script/

On 8/6/2010 11:28 AM, JP wrote:
> Thanks Jason,
>
> Please drop me example rptdesign.
>
> thanks,
> JP
Re: Master Page or(page orientation) Based on the parameter [message #551622 is a reply to message #551454] Sun, 08 August 2010 12:32 Go to previous messageGo to next message
JP Redro is currently offline JP RedroFriend
Messages: 181
Registered: July 2009
Location: India
Senior Member

Hi Jason,

I am getting 404 exception with this link, Please validate and post me good one.

Thanks,
JP


Thanks,
JP
Re: Master Page or(page orientation) Based on the parameter [message #551774 is a reply to message #551622] Mon, 09 August 2010 14:08 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

http://www.birt-exchange.org/org/devshare/designing-birt-rep orts/1246-set-master-page-properties-using-script/

Jason

On 8/8/2010 8:32 AM, JP wrote:
> Hi Jason,
>
> I am getting 404 exception with this link, Please validate and post me
> good one.
>
> Thanks,
> JP
Re: Master Page or(page orientation) Based on the parameter [message #1802233 is a reply to message #551473] Mon, 04 February 2019 18:39 Go to previous message
Aaron Wideen is currently offline Aaron WideenFriend
Messages: 2
Registered: February 2019
Junior Member
Hi All ,
I'm fairly new to the scripting side of BIRT and aside from a few simple scripts I haven't done anything too complex.

I have a situation with a report design where for the first page "master page a" should be used on all other pages "master page b" should be used...

I'm leaning towards a script that could set the masterpage based on page number... Is this possible?

Thanks for the time!
Previous Topic:Sum All Rows based on Value of Field
Next Topic:BIRT 4.8 Update Site
Goto Forum:
  


Current Time: Sat Apr 20 04:14:51 GMT 2024

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

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

Back to the top