Dynamic filter parameters provide users with more control over the data they view in a report. Figure 10‑16 shows an example of the steps to create a dynamic filter parameter.
Figure 10‑16 Specifying properties for a dynamic filter parameter
In Report Studio, dynamic filter parameters modify the underlying query, so only data rows that meet the filter criteria are retrieved from the data set.
The basic properties you specify when you create a dynamic filter parameter are similar to the properties for a static filter parameter, with one exception. On Edit Parameter, you specify the operators to provide to users, and set a default operator. Figure 10‑16 shows an example of a dynamic filter parameter that includes a list of values. The display type is set to List Box. Dynamic filter parameters are always optional.
How to create a dynamic filter parameter at the report table level
1 Select and right‑click the column for which you want to create a prompt. Choose Filter➛Filter. Filter appears. The selected column appears in Filter By.
3 In Prompt Text, type a description for the prompt.
4 If the report contains aggregate data, do one of the following:
To recalculate aggregate data values across the filtered data rows, select Recalculate Totals, if necessary.
To calculate aggregate data for the unfiltered data, deselect Recalculate Totals.
5 Choose Edit Parameter. In Edit Parameter, complete the following steps:
1 In Prompt Text, if required, modify the text you typed earlier.
2 In Help Text, optionally type a tooltip that assists the user in selecting parameter values, for which Report Studio displays data.
3 In Display Type, choose List Box.
4 In Dynamic Filter Condition, in Operator, select one or more operators from the drop‑down list to provide to the user. By default, all operators are selected. To select operators from the list, deselect All Operators. Then, press Ctrl and select each operator from the list of available operators.
5 Select a default operator from the drop‑down list.
In Advanced Filter, Prompt Text displays the text you entered earlier.
5 Choose Add Filter. The dynamic filter parameter condition appears in Filters, as shown in Figure 10‑19.
Choose OK. The Filter pane displays the condition.
6 To test the prompt in Report Studio, choose Data➛Parameters. Parameters displays the prompt, as shown in Figure 10‑20. The default operator specified in the example condition is In, and the default value is USA.
Figure 10‑20 Parameters displaying the dynamic prompt
When working with a dynamic prompt for a column containing numeric data that uses the Match or Not Match operators, if you use the value 1 as the string value to match, you must use double quotation marks (" ") to enclose the value. Type the value as "1" in the text box or combo box, so that Report Studio evaluates it accurately as a literal string. If you use other numbers as strings, such as 2, 3, and so on, you do not need to enclose them in double quotation marks.