Creating a static filter parameter
This section describes how you can create a static filter parameter at the report table and data set level.
How to create a static filter parameter at the report table level
1 In Report Studio, select and right‑click the column that contains the values for which you want to create a static prompt. Choose FilterFilter. Filter appears, as shown in Figure 11‑11.
Figure 11‑11 Creating a filter that prompts for a value when the report runs
2 In Filter, select Static, if necessary.
3 In Condition, select an operator.
4 Select Prompt Text, then type the text to display.
5 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 rows, deselect Recalculate Totals.
6 Choose Edit Parameter, as shown in Figure 11‑11.
7 In Edit Parameter, complete the following steps:
1 In Prompt Text, modify the existing text, if necessary.
2 In Help Text, optionally type a tooltip to assist the user in selecting the values for which Report Studio displays data.
3 Accept the default selection of Is Required. To make the parameter optional, deselect Is Required.
4 In Display Type, select an option from the list. The example in Figure 11‑12 shows the display type set to Text Box.
Figure 11‑12 Creating a static parameter
5 Select the values to make available to the report user when the report runs. Choose Select Values. Select a value from the list of values that appears in Find, then press Ctrl and select each additional value to display. Alternatively, use the method described in How to select multiple values for a filter condition.
6 If you selected Text Box as the display type, set a default value. If you do not specify a default value, the first value you selected is set as the default value. The example in Figure 11‑12 displays Boston as the default value.
Choose OK. The specified default value appears in Default Value, on Filter, as shown in Figure 11‑13. Choose OK. The filter condition takes effect.
Figure 11‑13 Filter displaying the specified parameter properties
How to create a static filter parameter with a list of values
When you create a static filter parameter and select an available display type other than Text Box, you can create a static or dynamic list of data values to provide to the user. To create a static filter parameter with a list of values, on Edit Parameter, complete the following steps:
1 In Prompt Text, if necessary, type the display text for the prompt.
2 In Help Text, optionally type a tooltip to assist the user in selecting values for which Report Studio displays data.
3 Accept the default selection of Is Required. To make the parameter optional, deselect Is Required.
4 In Display Type, select an option other than Text Box from the list of options. The example in Figure 11‑14 shows the selection of List Box.
Figure 11‑14 Creating a static list of parameter values
5 In List of Values, do one of the following:
*Select Static to create a static list of values that the report developer specifies. If you select Static, proceed to step 6.
*Select Dynamic to create a list of values that is retrieved from the data set when the report runs. If you select Dynamic, proceed to step 8.
6 To select the values to make available to the report user when the report runs, choose Select Values.
In Find, select a value from the list of values that appears, then press Ctrl and select any additional values to display. Alternatively, use the method described in How to select multiple values for a filter condition. The specified values appear in Selected Values.
7 In Selected Values, select a value to set as the default value, as shown in Figure 11‑14.
*If the parameter is optional, you do not need to specify a default display value.
*If the parameter is optional, No Value appears on Edit Parameter. Select No Value to display data rows that have null values.
Choose OK. Proceed to step 10.
8 In Data Set, from the drop‑down list, select Current column (No Data Set) to create the list of values from the report table, as shown in Figure 11‑15, or select an available data set to create the list of values from the data set.
Figure 11‑15 Creating a dynamic list of values
If you selected the current column, do the following:
*Choose Select Values. In Find, select a value from the list of values that appears, then press Ctrl and select each additional value to display. The first value you select is set as the default value. Alternatively, use the method described in How to select multiple values for a filter condition.
*In Sort, in Sort Direction, optionally select either Ascending or Descending. If you do not specify a sort direction, Report Studio displays the default value first, and arranges the remaining values in ascending order below the default value.
Choose OK. Proceed to step 10.
9 In Data Set, if you selected an available data set, do the following:
*In Select Value Column, select the column whose values are filtered according to the parameter condition.
*In Select Display Text, select a column from the drop‑down list, containing the values displayed to the user. For example, you can choose to display the sales office cities for the user to choose from, instead of the office code values.
*Choose Select Values. In Find, select a value from the list of values that appears, then press Ctrl and select the remaining values you want to display. The first value you select is set as the default value. Alternatively, use the method described in How to select multiple values for a filter condition.
*In Sort, specify a field by which to sort the list of values.
*In Sort Direction, select either Ascending or Descending from the drop‑down list. If you do not specify a sort direction, Report Studio displays the default value first, and arranges the remaining values in ascending order below the default value.
Choose OK.
10 On Filter, choose OK.
11 To test the prompt in Report Studio choose DataParameters. Parameters displays the prompt, as shown in Figure 11‑16. In this example, the default parameter value is Boston.
Figure 11‑16 Parameters displaying the specified prompt
How to create a static filter parameter at the data set level
1 Create a new report by selecting a template containing a data set, an information object, or a data object.
2 Select the data fields to insert in the report, and lay out the report.
3 In Report Studio, in Available Data, choose Filter.
4 In Advanced Filter, in Filter By, select a column from the drop‑down list.
5 In Condition, select an operator from the drop‑down list.
6 Select Prompt Text, then type the text to display. Edit Parameter is highlighted, and Is Required appears selected.
7 Choose Edit Parameter. In Edit Parameter, create the parameter condition as you did earlier in this section.
Figure 11‑17 displays the completed filter parameter condition. The selected default value appears in Default Value.
Figure 11‑17 Advanced Filter displaying the static filter parameter condition
8 Choose Add Condition. The condition appears in Conditions, as shown in Figure 11‑17.
9 Choose Add Filter. The static filter parameter condition appears in Filters. Choose OK.
To test the prompt in Report Studio choose DataParameters. Parameters displays the prompt, as shown in Figure 11‑18. The default value specified in the example condition is USA.
Figure 11‑18 Parameters displaying a static parameter condition