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)
Hiding Chart
Suneel Mac
Hi,<br />
<br />
I want to display chart or table depending upon the Report parameter input.<br />
<br />
Report parameter (abc) is radio button of values Table and Chart.<br />
<br />
I am using the following code for that..<br />
<br />
<strong class='bbc'>In Table onPrepare I am</strong> using..<br />
<br />
<br />
if(params["abc"].value == "Chart") {<br />
this.getReport().getTable("myTable").getStyle().display = "No Display";<br />
}<br />
<br />
<strong class='bbc'>on Chart render i am using the following code..</strong><br />
<br />
function afterDrawBlock( block, icsc )<br />
{<br />
<br />
<br />
<br />
rpCtx = icsc.getExternalContext().getScriptable();<br />
var myParam = rpCtx.getParameterValue("abc");<br />
if(myParam == "Table")<br />
{<br />
block.setBounds(new Bounds());<br />
//block.setVisible('flase'); <br />
<br />
}<br />
<br />
<br />
}<br />
<br />
when i am selecting chart it is working fine..<br />
<br />
When i am using Table.. it is showing the folllowing error..<br />
<br />
The following items have errors: <br />
<br />
<br />
Chart portfolioChart: <br />
- ReferenceError: "Bounds" is not defined. at line 22 of chart script:'' <br />
exception.javascript.error ( 1 time(s) )<br />
detail : org.eclipse.birt.report.engine.api.EngineException: ReferenceError: "Bounds" is not defined. at line 22 of chart script:''<br />
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1199)<br />
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.processExtendedContent(LocalizedContentVisitor.java:1046)<br />
<br />
<br />
<em class='bbc'><strong class='bbc'>Can you help me on this hiding the chart Issue..?</strong></em>
Find more posts tagged with
Comments
Hans_vd
Why don't you use the visibility property of the chart.
You can write an expression to conditionally hide/show the chart.
Regards
Hans
Suneel Mac
Thank you ..
I am getting the output what i expected after setting visibility property of chart..
Thanks & regards
Suneel