Skip to main content



      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 00:43 Go to next message
Eclipse UserFriend
Hi,
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 00:45] by Moderator

Re: Setting an element visibility using RE api [message #1049612 is a reply to message #1048896] Fri, 26 April 2013 00:15 Go to previous message
Eclipse UserFriend
Can you not pass the values through parameters and modify the report to use the values you pass through?
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: Sun Apr 20 03:31:07 EDT 2025

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

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

Back to the top