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:

  1. We will start by creating prompts for both the filters. For ...

Get IBM Cognos 10 Report Studio Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.