Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Setting an element visibility using RE api(setting visibility of an element like Table using RE api)
Setting an element visibility using RE api [message #1048896] Thu, 25 April 2013 04:43 Go to next message
Prashant Jha is currently offline Prashant JhaFriend
Messages: 18
Registered: September 2011
Junior Member
I want to switch on and off a table element, andor set other properties of report before firing it in java code using RE api. However, for table element, if I try to set visibility property, i get error saying i cannot set a structure. I will try to explain with code for RE api....
In rptdesign I set name for chart element as chartTable.
IReportRunnable design = engine.openReportDesign(reportDesignFile);
ReportDesignHandle rptHandle = (ReportDesignHandle)design.getDesignHandle();
DesignElementHandle elemHandle = rptHandle.findElement("chartTable");
elemHandle.setBooleanProperty("visibility", false);

This doesn't work as there is no boolean visibility property.
Essentially, I have a rptdesign file which I intend to run at client side. RptDesign has a few elements which can be set according to end user configuration. I capture the information from end user in the format: objectId, property, propertyType, value . Then I make the changes to the properties using the code above, and run the report.
Can I set a property of Chart Element to switch it on and off. Any special handling will mean glue code in java which will be difficult to maintain. Designing Reports in a particular way, like attaching a property, etc. is a better solution. Can it be done?
----using birt 3.7.2 ----

[Updated on: Thu, 25 April 2013 04:45]

Report message to a moderator

Re: Setting an element visibility using RE api [message #1049612 is a reply to message #1048896] Fri, 26 April 2013 04:15 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Can you not pass the values through parameters and modify the report to use the values you pass through?


Developer Evangelist, Silanis
Previous Topic:Column width not proportional in PDF while using Dynamic Text
Next Topic:Connection Closes for SQL Server 2008 R2
Goto Forum:

Current Time: Fri Jun 09 15:07:04 GMT 2023

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

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

Back to the top