Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Conditional rendering of line charts
pratim
Hi,<br />
<br />
I am using BIRT 2.3.2 version. I have 2 different layouts of line charts [each having 4 line charts]. On a certain condition i want to display one report layout at a time.<br />
To achieve this, i used the visibility property and set it to true when certain condition is met.<br />
<br />
But hiding the chart does not solve my purpose, as in the background it's rendering the chart but not displaying. Because of which my report is taking too much time for rendering.<br />
[i just plot the time taken for generation and rendering in a log file]<br />
<br />
What i want is to reduce the rendering time for the report. If i removed the 4 charts, then my rendering time reduces by 50%.<br />
<br />
Can any one help me out to resolve this?
Find more posts tagged with
Comments
mwilliams
Name your charts in the general tab of the property editor, then depending on which layout you want to show, I'm assuming you'd decide this by a parameter, you'd drop the appropriate charts from the design. Here is how you'd find a chart by name and drop it.
(beforeFactory script)
reportContext.getReportRunnable().designHandle.getDesign().findElement("myChart").drop();
pratim
Hi, I tried the below in (beforeFactory script),
reportContext.getReportRunnable().designHandle.getDesign().findElement("myChart").drop();
When i run the report it throws error "TypeError: Cannot find function drop. (/report/method[
@name="
;beforeFactory"
There are only 2 functions "dropUserPropertyDefn() and dropDerived()".
And those 2 are also giving error, any help !
org.mozilla.javascript.EvaluatorException: Can't find method org.eclipse.birt.report.model.core.DesignElement.dropUserPropertyDefn(). (/report/method[
@name="
;beforeFactory"]#1)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
pratim
Hi mwilliams,
got it correct by the following,
reportContext.getReportRunnable().designHandle.getDesignHandle().getModuleHandle().findElement("myChart").drop();