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)
CheckBox Parameter
Emy
<p>Hi, </p>
<p> </p>
<p> I need to show checkbox parameters at the top of report.By doing so,We can select multiple parameters at once.How can i do this?</p>
Find more posts tagged with
Comments
JFreeman
<p>It should be similar to this previous post of yours I replied to: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/36755-need-listbox-parameter-at-top-of-the-report/?p=137016'>http://developer.actuate.com/community/forum/index.php?/topic/36755-need-listbox-parameter-at-top-of-the-report/?p=137016</a></p>
;
Emy
<p>Hi Jfreeman,</p>
<p> </p>
<p> Thanks for your reply.I want Checkbox parameter at the top not listbox parameter.</p>
<p> </p>
<p>For Eg,</p>
<p> </p>
<p>I need to design A,B,C,D charts with the checkbox parameters E,F,G,H. All charts are shown while running.</p>
<p>If i select F & H at the top of checkbox,want to show charts only for that & all other A,D are not shown.</p>
<p> </p>
<p>How to achieve it.</p>
<p> </p>
<p>Regards,</p>
<p>Emy</p>
JFreeman
<p>The general concept is very much the same, you will create a text element at the top of the page and use HTML/Javascript to create the check boxes and determine visibility of the charts in the DOM tree based on the check boxes.</p>
<p> </p>
<p>For example, if my report has 2 charts that are bookmarked as "chart1" and "chart2", this can be achieved with a text box with code like this:</p>
<pre class="_prettyXprint _lang-html">
<div id="checkBoxDiv">
<input type="checkbox" id="chart1box" value="chart1" onclick=modifyVisibility()>Chart A</input>
<input type="checkbox" id="chart2box" value="chart2" onclick=modifyVisibility()>Chart B</input>
</div>
<script>
function modifyVisibility(){
var chart1 = document.getElementById("chart1");
var chart2 = document.getElementById("chart2");
if(chart1box.checked == true && chart2box.checked == false){
chart2.style.visibility = "hidden";
chart1.style.visibility = "visible";
}else if(chart1box.checked == false && chart2box.checked == true){
chart1.style.visibility = "hidden";
chart2.style.visibility = "visible";
}else if(chart1box.checked == true && chart2box.checked == true){
chart1.style.visibility = "visible";
chart2.style.visibility = "visible";
}else if(chart1box.checked == false && chart2box.checked == false){
chart1.style.visibility = "visible";
chart2.style.visibility = "visible";
}
}
</script>
</pre>
<p>I have also attached a sample report with this code in place for reference.</p>