How to dynamically control parameter visibility
<p>[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]I have a report where I want to ask one of two questions, depending on the value passed to the report from an application. I therefore have 3 parameters.[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]param1, the hidden param I receive a value for, A or B. If the value of param1 is 'A', I want [/color]<span style="background-color:rgb(244,244,244);color:rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;">param2Color</span><span style="background-color:rgb(244,244,244);color:rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;"> to be displayed as a drop-down and I want param3Size to be hidden. If the value of param1 is 'B', I want param2Color to be hidden and I want param3Size to be displayed as a drop-down. </span></p><p> </p><p>[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]If the value is A, I want [/color]<span style="background-color:rgb(244,244,244);color:rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;">param2Color</span><span style="background-color:rgb(244,244,244);color:rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;"> to be displayed and param3Size to be hidden.</span></p><p>[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]If the value is B, I want param3Size to be displayed and param2Color to be hidden.[/color]<br />
<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]I then want to modify the dataset select statement in the 'beforeOpen' script with the following[/color]<br />
<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]if (params["param2Color"] == "")[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]{[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);];[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]}[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]else[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]{ [/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]this.queryText = this.queryText + " and `color` = " + params["param2Color"] ; [/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]}[/color]<br />
<br />
<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]if (params["param3Size"] == "")[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]{[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);];[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]}[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]else[/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]{ [/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]this.queryText = this.queryText + " and `size` = " + params["param3Size"] ; [/color]<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]}[/color]<br />
<br />
<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]... and I want just one of the two restrictions to apply, depending on the value of param1. It is the 'hidden' attribute of the param2Color and param3Size that I want to control.[/color]<br />
<br />
<br />
[color=rgb(0,0,0);font-family:Verdana, Geneva, Lucida, 'Lucida Grande', Arial, Helvetica, sans-serif;font-size:13px;background-color:rgb(244,244,244);]Any help would be much appreciated.[/color]</p>