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)
Check box Prompt to Show/Hide
Vanitha P
Hi all,
I need to create a Check Box prompt, to show/Hide a Table and another report ( it may be any kind of report ). If i have checked the prompt means, Only Table need to be shown, otherwise that another report to be shown.
I have tried with this,by using Boolean Data type and visibility property, but i couldn't find the proper solution.
Can anyone help with me to solve this issue?
Thanks in advance.
Find more posts tagged with
Comments
kclark
Is the report you want to show in another rptdesign or do you have it in a a grid? You could put the report in a grid and the table could be at the top by itself. Then in the beforeFactory() of the report you could do drop one or the other like this.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(params["Hide?"].value == true) {
// Hide the table and show the report that's in the grid
var table = reportContext.getDesignHandle().getElementByID(9);
table.drop();
} else {
// Hide the report inside the grid and show the table
var grid = reportContext.getDesignHandle().getElementByID(52);
grid.drop();
}
</pre>
<br />
Or if you need to show another rptdesign you could add a text item to your grid redirecting to another report<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<script>
window.location = "http://location/of/2nd/report.rptdesign";
</script>
</pre>
<br />
and use the same code as above. It will either show the table or redirect to the second report.
Vanitha P
Thank you for your reply
As i am new to this tool, it is quite difficult to understand and follow the steps. Could you please upload or share any sample/example file regarding this?
Thanks in advance.
Vanitha P
I tried and got the output
Thanks a Lot
kclark
Glad it's working!