Adding Prompts to Filter Data
Prompts are composed of three interrelated components: parameters, prompt controls, and parameter values. Parameters are based on parameterized filters and form the questions to ask users. Prompt controls provide the user interface in which the questions are asked. Parameter values provide the answers to the questions.
IBM® Cognos® Report Studio provides several ways to create prompts. You can
- use the Build Prompt Page tool
- build your own prompt and prompt page
- create a parameter to produce a prompt
- insert prompts directly into the report page
- in dimensional reporting, you can also define prompts using context filters
If you include reports from different packages in an interactive dashboard that uses global filters, ensure that you use the same parameter name for the prompt in all the reports. For more information about creating interactive dashboards in IBM Cognos Connection, see the IBM Cognos Business Intelligence Administration and Security Guide.
You can also create prompts in the package. For more information, see the IBM Cognos Framework Manager User Guide.
You can also use context filters, also known as slicer filters, to focus the data in your report.
Syntax of Prompt Expressions
Prompt expressions use the following syntax, where p represents the parameter name.
You can also use these expressions to create parameterized data items that you can then use in master detail relationships.
The type of expression you use depends on whether you have chosen relational or dimensional reporting style. For more information about reporting styles, see Relational and dimensional reporting styles.
Relational: Detail Filter Expressions | Dimensional: Context (Slicer) or Edge Expressions |
---|---|
[data item] = ?p? for single-select prompts and master detail relationships |
[level or hierarchy]->?p? For single-select member prompts and master detail relationships |
[data item] in ?p? for multi-select prompts |
set([level or hierarchy]->?p?) For multi-select member prompts filter ([set], [property expression] = ?p? ) For single-select value prompts and master detail relationships A property expression is an expression that is assigned to a property to enable dynamic update of the property when the report runs. filter ([set], [property expression] IN ?p? ) For multi-select value prompts A property expression is an expression that is assigned to a property to enable dynamic update of the property when the report runs. |