Designing reports using BIRT Studio : Filtering data : Prompting for filter values at run time : Creating a dynamic filter parameter : How to create a dynamic filter parameter at the report table level
 
How to create a dynamic filter parameter at the report table level
1 Select the column for which you want to create a prompt, and choose Filter. Filter appears. The selected column appears in Filter By.
2 Select Dynamic, as shown in Figure 5‑32.
Figure 5‑32 Specifying filter parameter properties
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 BIRT 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.
6 In List of Values, do one of the following:
*Select Static to create a static list of values. A static list contains values specified by the report developer. If you selected Static, proceed to step 7.
*Select Dynamic to create a dynamic list of values. A dynamic list contains values that are generated at run time from the report table or the data set. If you selected Dynamic, proceed to step 9.
7 Choose Select Values. In Find, select the values from the list of values. You can also type each value in Enter value, then choose Add value. The specified values appear in Selected Values.
8 In Selected Values, select a value to set as the default value.
Choose OK. Proceed to step 6.
9 In Data Set, select Current Column (No data set), to create the list of values from the report table, or select an available data set to create the list of values at the data set level. If you selected the current column, do the following:
*Choose Select Values. In Find, select a value from the list of values that appears, to set as the default value.
*In Sort, in Sort Direction, select Ascending or Descending. If you do not specify a sort direction, BIRT Studio displays the default value first, and arranges the other values in ascending order below the default value.
Choose OK. Proceed to step 6.
10 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. The example shown in Figure 5‑33 uses the Product Name column.
*In Select Display Text, optionally select a column from the drop‑down list, containing the values displayed to the user. In the example, as shown in Figure 5‑33, displayed values are selected from the Product Code column.
*In Enter Value, optionally specify a default value.
*In Sort By, select a sort field by which the data in the list of values is sorted. In the example, as shown in Figure 5‑33, displayed values are sorted by Product Line.
*In Sort Direction, select Ascending or Descending.
If you do not specify a sort direction, BIRT Studio displays the default value first, and arranges the remaining values in ascending order below the default value.
Figure 5‑33 Specifying a dynamic list of values
Choose OK.
6 On Filter, choose OK.
7 To test the prompt in BIRT Studio, choose Parameter. Parameters displays the prompt, as shown in Figure 5‑34.
Figure 5‑34 Parameters displaying a dynamic prompt