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)
chart show hide According to parameter
sumathra
<div>Hi i have requirement to show and hide chart based on list box-parameter now let us consider that am having three dataset for three chart in report.</div><div>i )if user select first list box-parameter like item-->it have to pass value to first chart and display that chart only</div><div>ii) if user select Second list box-parameter like main-->it have to pass value to second chart and display that chart only</div><div>like wise it will go so i tried with before factory or html script but it Two cant work can somebody help on this???</div><div> </div><div><pre class="_prettyXprint">Beforefactory:itemname = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("item");mainname = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("main");subname = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("sub");if (params["item"].value){mainname.drop();subname.drop();}else if (params["main"].value){itemname.drop();subname.drop();}else{mainname.drop();itemname.drop();} (or) Html script in Report<script>if (<VALUE-OF>params["item"].value</VALUE-OF> == true){document.getElementById("A").style.display = "block";document.getElementById("B").style.display = "none";document.getElementById("C").style.display = "none";}if(<VALUE-OF>params["main"].value</VALUE-OF> == true){document.getElementById("A").style.display = "none";document.getElementById("B").style.display = "block";document.getElementById("C").style.display = "none";}if(<VALUE-OF>params["subgroup"].value</VALUE-OF> == true){document.getElementById("A").style.display = "none";document.getElementById("B").style.display = "none";document.getElementById("C").style.display = "block";}</script></pre></div>
Find more posts tagged with
Comments
micajblock
<p>I have this code which works.</p><p> </p><div><pre class="_prettyXprint">var tTable = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("Total Table");tTable.drop();</pre></div><p>What version are you using, I could probably built a quick example.</p>
sumathra
<p>I am using 4.3 version i have to drop three chart according to three listbox parameter</p>
micajblock
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/devshare/_/designing-birt-reports/simple-example-of-dropping-a-tablechart-r1636'>http://developer.actuate.com/community/devshare/_/designing-birt-reports/simple-example-of-dropping-a-tablechart-r1636</a></p>
;
404040
<p>i could't find an example on this link???</p>
sumathra
<p>thanks for u r reply mblock . i visit a link which u provide in this u create a one listbox parameter and it contain some value so u just drop the according to value it fine ....but according to me there is three listbox and three chart according to parameter select chart have to drop kindly look at this sample report u will understood</p>
micajblock
<blockquote class="ipsBlockquote" data-author="404040" data-cid="126873" data-time="1395807925"><div><p>i could't find an example on this link???</p></div></blockquote><p>There is now. There was an issue with the DevShare.</p>
micajblock
<blockquote class="ipsBlockquote" data-author="sumathra" data-cid="126874" data-time="1395809925"><div><p>thanks for u r reply mblock . i visit a link which u provide in this u create a one listbox parameter and it contain some value so u just drop the according to value it fine ....but according to me there is three listbox and three chart according to parameter select chart have to drop kindly look at this sample report u will understood</p></div></blockquote><p>So the logic will be slightly different, but the functionality will be the same. Have you looked at my example?</p>
micajblock
<p>Also:</p><ul class='bbcol decimal'><li>your parameter name was wrong (you had customer when the parameter name is country) </li><li>Your logic is wrong. You need to ad else. </li></ul><p> </p><p>This will fix your design</p><p> </p><div><pre class="_prettyXprint">if (params["country"].value){order1.drop();product1.drop();}else if (params["order"].value){customer1.drop();product1.drop();}else if(params["product"].value){customer1.drop();order1.drop();}</pre></div>
sumathra
<p>ya thank u for reply it work well.Is this correct way to drop ???or it can be do with visibility property for this any idea ??</p>
micajblock
<p>Visibility will just hide the table, the query it uses will still get executed. Dropping the table is better for performance reasons as the query will not get executed.</p>