Using prompt and promptmany macros in query subject

This recipe will show you that macros can be used with standard query subjects as well.

Getting ready

Create a simple list report based on GO Sales Data Warehouse (Query) package. Insert Product line, Product name, Product color, and Product size as the columns.

How to do it...

  1. Go to Query Explorer and open the query used by list.
  2. Add a detail filter with following definition:
    [Product line] = #prompt('ProductLine')#
  3. Add another detail filter as follows:
    [Product name] in #promptmany('Product')#
  4. Run the report to test it. You will see two mandatory prompts. The one for Product line will let you enter one value. Whereas the other one will be on product and it will allow you to enter multiple values.

Get IBM Cognos 8 Report Studio Cookbook 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.