Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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
Prashant Jha is currently offline Prashant Jha
Messages: 18
Registered: September 2011
Junior Member
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]

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 00:15 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1546
Registered: July 2009
Senior Member

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

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
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: Wed Jul 23 14:18:07 EDT 2014

Powered by FUDForum. Page generated in 0.01896 seconds