Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to get the report "Layout preference" with engine API
How to get the report "Layout preference" with engine API [message #1006821] Sat, 02 February 2013 12:19 Go to next message
donino donino is currently offline donino doninoFriend
Messages: 183
Registered: July 2011
Senior Member
Hi,

I would need to check with the report engine API if a report has been set to "auto" or "fixed" (layout preference property).

I found with a IReportRunnable object we can get this:
IReportRunnable reportDesign;
...
reportDesign.getDesignHandle().getDesignHandle().getLayoutPreference();


However this way is deprecated and returns null, it is said here we must use a moduleHandle instead:
reportDesign.getDesignHandle().getModuleHandle().*

This moduleHandle has tons of methods, but not a "getLayoutPreference()" Sad .

Please is there a way to get this property with the report engine API?

Thanks

[Updated on: Sat, 02 February 2013 12:22]

Report message to a moderator

Re: How to get the report "Layout preference" with engine API [message #1006850 is a reply to message #1006821] Sat, 02 February 2013 21:41 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

From the designer, reportContext.getDesignHandle().getLayoutPreference() works. What's your BIRT version?

Michael

Developer Evangelist, Silanis
Re: How to get the report "Layout preference" with engine API [message #1006970 is a reply to message #1006850] Sun, 03 February 2013 11:19 Go to previous messageGo to next message
donino donino is currently offline donino doninoFriend
Messages: 183
Registered: July 2011
Senior Member
Thank you Michael,

I use BIRT 4.2.1 both for Runtime / Eclipse Designer

You are right i missed it worked like this in the designer, though we still have an issue with it: as you can see in a script expression of the designer, unlike all others methods this function is not suggested by the code completion, i wonder why? If we try to use it in a java project from a ModuleHandle:

IReportRunnable reportDesign;
...
reportDesign.getDesignHandle().getModuleHandle().getLayoutPreference();
the Java project is refusing to be compiled because this method is unknown in the class ModuleHandle. I probably missed something, it seems to be the only report property that we are not able to retrieve from a "IReportRunnable" object, please could you help?

Thanks!
Re: How to get the report "Layout preference" with engine API [message #1007021 is a reply to message #1006970] Mon, 04 February 2013 05:46 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Try this:

reportDesign.getDesignHandle().getModuleHandle().getDisplayProperty("layoutPreference");


Michael

Developer Evangelist, Silanis
Re: How to get the report "Layout preference" with engine API [message #1007124 is a reply to message #1007021] Mon, 04 February 2013 14:38 Go to previous messageGo to next message
donino donino is currently offline donino doninoFriend
Messages: 183
Registered: July 2011
Senior Member
Great!!! It works! thanks a million Michael, i was struggling with this!!!
Re: How to get the report "Layout preference" with engine API [message #1007136 is a reply to message #1007124] Mon, 04 February 2013 15:23 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You're welcome! Glad to help!

Michael

Developer Evangelist, Silanis
Previous Topic:Persistent variables in BIRT scripts
Next Topic:Where do I put sqljdbc_auth.dll file so that BIRT sees it?
Goto Forum:
  


Current Time: Fri Apr 19 20:26:30 GMT 2024

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

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

Back to the top