Create Multi-Value and Cascading Report Parameters
- 2 minutes to read
This document describes the implementation of multi-value and cascading parameters. Multi-value parameters can accept more than a single value, and cascading parameters display values corresponding to current values of other parameters.
Multi-Value Parameters
To assign a collection of values to a parameter, enable its Parameter.MultiValue property. In the Add New Parameter dialog, this option corresponds to the Allow multiple values checkbox.
Multi-value parameters are useful when you need to filter report data against a list of values. The following image illustrates a correct filtering expression that incorporates a multi-value parameter. This expression is assigned to the XtraReportBase.FilterString property of a report.
The following image demonstrates an editor for a multi-value parameter in a print preview.
To assign values to a multi-value report parameter in code, construct an array of the required type. For example:
To learn about using multi-value query parameters, see Query Parameters.
Cascading Parameters
The list of values available for a parameter in a Print Preview can be filtered based on the current value of another parameter.
To filter the list of parameter values, click the ellipsis button for the LookUpSettings.FilterString property in the Add New Parameter dialog window and specify a filter string that refers to another parameter.
Next, click the report’s smart tag, and in the invoked actions list, click the ellipsis button for the XtraReportBase.FilterString property. In the invoked FilterString Editor, construct an expression that uses both parameters:
The following image illustrates cascading parameters, with the Product values filtered based on the selected Category.