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 Hide/Show
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
To show/hide your table you could use some code like this in the beforeFactory() of the report.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>customers = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("MyTable");
if(params["NewParameter"].value == true) {
customers.drop();
}</pre>
<br />
Does the other report need to be opened in the current window or should it replace that report? If it needs to replace it you could add a JavaScript redirect to a text element like this.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><script type="text/javascript">
window.location = "http://location/to/other/report"
</script></pre>
<br />
Then you could drop either the text or table depending on the parameter.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
customers = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("MyTable");
redirect = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("redirect");
if(params["NewParameter"].value == true) {
customers.drop();
}else{
redirect.drop();
}</pre>