Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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 Redro
Messages: 167
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 Weathersby
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 Redro
Messages: 167
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 Weathersby
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 Redro
Messages: 167
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 message
Jason Weathersby is currently offline Jason Weathersby
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
Previous Topic:Links issue
Next Topic:how to display all datas in line chart
Goto Forum:
  


Current Time: Wed Oct 01 14:34:25 GMT 2014

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

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