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 Filter➛Filter. Filter appears, as shown in Figure 10‑8.
Figure 10‑8 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 data, deselect Recalculate Totals.
7 Edit Parameter appears. 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 10‑9 shows the display type set to Text Box.
Figure 10‑9 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.
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 10‑9 displays Boston as the default value.
Choose OK. The specified default value appears in Default Value, on Filter, as shown in Figure 10‑10. Choose OK. The filter condition takes effect.
Figure 10‑10 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 10‑11 shows the selection of List Box.
Figure 10‑11 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 8.
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. You can also type each value in Enter Value, then choose Add Value. The specified values appear in Selected Values.
7 In Selected Values, select a value to set as the default value, as shown in Figure 10‑11.
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.
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 10‑12, or select an available data set to create the list of values from the data set.
Figure 10‑12 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.
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.
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 office code values for the user to choose from, instead of the names of sales office cities.
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.
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 Test the prompt in Report Studio by choosing Parameter. Parameters displays the prompt, as shown in Figure 10‑13. In this example, the default parameter value is Boston.
Figure 10‑13 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 Advanced Filter appears. 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 10‑14 displays the completed filter parameter condition. The selected default value appears in Default Value.
Figure 10‑14 Advanced Filter displaying the static filter parameter condition
8 Choose Add Condition. The condition appears in Conditions, as shown in Figure 10‑14.
9 Choose Add Filter. The static filter parameter condition appears in Filters.
Choose OK. The Filter pane displays the specified condition.
Test the prompt in Report Studio by choosing Parameter. Parameters displays the prompt, as shown in Figure 10‑15. The default value specified in the example condition is USA.
Figure 10‑15 Parameters displaying that static parameter condition