Showing/hiding prompt controls at runtime
Let's say a report shows sales quantity by product line and order method type. Users need to filter on either product line or order method type, any one at a time.
They would like a facility to select which prompt they would want to filter on, and depending on the selection, the prompt should appear.
Getting ready
Create a list report that shows product lines, order method types, and sales quantity. Create two options filters—one on product lines and the other on order methods.
How to do it...
In this recipe, we will use JavaScript to control showing or hiding a prompt based on the selection of another prompt. To do this, perform the following steps:
We will start by creating prompts for both the filters. For that, add a prompt page and add two value prompts. Use the prompt wizard to connect them to the parameters (product line and order method).
Set the Hide Adornment property of both the prompts to Yes.
Now drag an HTML item just before the product line...