Filtering Parameter Options
This example continues from Defining a Parameter Flow. Because of the parameter flow you defined there, the 'CityChoice' control is enabled only after the user selects a 'StateChoice' option. In such a case, it is also desirable to limit the options shown in the 'CityChoice' control to only those that are consistent with the given 'StateChoice' selection.
To populate the 'CityChoice' control with values that are consistent with the user's 'StateChoice' selection, follow the steps below.
1. Bind the 'StateChoice' control to a data source. Follow these steps:
a. Right-click the 'StateChoice' control, and select 'Properties' from the context menu. This opens the 'Choice Properties' dialog box.
b. In the 'List Values' panel, select 'Query' and press the 'Edit' button.

This opens the 'Selection List' dialog box.
c. Under the Data tab, expand the 'Orders' node in the tree, and select 'Order Model'.

d. Click the Columns tab. Select the 'Customer.State' column in the list, and click the right-arrow. Then click 'OK'.

This will populate the 'StateChoice' control with the data from the 'Customer.State' column. (It is assumed that this is the same 'State' data that will be used in the linked report.)
e. Press 'OK' to close the 'Choice Properties' dialog box.
6. Bind the 'CityChoice' control to a data source:
a. Right-click the 'CityChoice' control, and select 'Properties' from the context menu. This opens the 'Choice Properties' dialog box.
b. In the 'List Values' panel, select 'Query' and press the 'Edit' button. This opens the 'Selection List' dialog box.
c. Under the Data tab, expand the 'Orders' node in the tree, and select 'Order Model'.

d. Click the Columns tab. Select the 'Customer.City' column in the list, and click the right-arrow.

This will populate the 'CityChoice' control with the data from the 'Customer.City' column. (It is assumed that this is the same 'City' data that will be used in the linked report.)
e. Click the Condition tab. Using the menus, select the following condition: “[Customer.State] [is] [equal to]”.
f. Click the “arrow” button at the right side of the condition, and select 'Variable' from the menu.
g. Enter “st” in the 'Label' field, and click 'Append' to apply the condition.

This will populate the 'CityChoice' control with data from the 'Customer.City' field where the 'Customer.State' value is equal to the value of the 'st' parameter set by the user's 'StateChoice' selection. As a result, the 'CityChoice' control displays only cities within the selected state.
h. Press 'OK' to close the 'Selection List' dialog box.
i. Press 'OK' to close the 'Choice Properties' dialog box.
10. Click the Style Studio 'Save' button, and save this Parameter Sheet under the name “StateAndCity”.
The next step is to link the Parameter Sheet to the desired report. In the next section, Linking a Parameter Sheet to a Report, you will create a new report, and link it to the parameter sheet.
| << Defining a Parameter Flow | © 1996-2013 InetSoft Technology Corporation (v11.4) | Linking a Parameter Sheet to a Report >> |