Using the prompt() and promptmany() macros in query subjects
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 the GO Sales Data Warehouse (Query) package. Insert Product line, Product, Product color, and Product size as the columns.
How to do it...
In this recipe you will see how to use macros as filters in Query Explorer as follows:
Go to Query Explorer and open the query used by list.
Add a detail filter with the following definition:
[Product line] = #prompt('ProductLine')#
Add another detail filter as follows:
[Product] in #promptmany('Product')#
Run the report to test it. You will see two mandatory prompts. The one for the 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.
How it works...
This is the same Prompt macro which we used in prior recipes with native SQLs. As you can see, macros can be used in standard query subjects...