<< Click to Display Table of Contents >>

This document describes how to create a multi-value parameter and use this parameter to filter report data.

multi-value-parameters-preview

 

Follow the steps below to create a multi-value parameter in the Report Designer:

1.Create a report parameter and enable the Allow multiple values option.

Enable the Allow multiple values option

2.Specify a list of predefined values for the parameter. You can create a static list of values or load values from a data source. Refer to the following topics for instructions on how to do it:

oReport Parameters with Predefined Static Values

oReport Parameters with Predefined Dynamic Values

To filter a report's data by a multi-value parameter, use the Is any of operator for this parameter in the report's filter string:

parameters-multi-value-filter-string

The filtered report is displayed after you specify parameter values.

parameters-multi-value-filter-report

A multi-value parameter's default values are selected automatically when you open a report's Print Preview:

Specify default values for a multi-value parameter

Use one of the following methods to specify default values:

Assign an array of values to the Default Value option.

Specify default values for a multi-value parameter

Enable the Select all values property to populate the parameter value with all items from the parameter's value source (static or dynamic).

Select all values as defaults for a multi-value parameter

Tip

Disable a report's Request Parameters property to avoid the Waiting for parameter values message on the report's Print Preview and display the report with default parameter values.

Note

Ensure that the type of default values match the parameter type when you specify these values for the parameter.

Optional parameters allow you to filter report data only if parameter values are specified. Otherwise, if parameter values are not set, the parameter is ignored.

Create an optional multi-value parameter

Do the following to make a multi-value parameter optional.

1.Create a multi-value report parameter and specify its Allow null value, Default Value, and Select all values options as shown below:

parameters-multi-value-optional-settings

Option

Value

Allow null value

true

Default Value

Not specified

Select all values

false

2.Disable the report's Request Parameters property.

report-requestparameters-disable

3.Assign the following filter condition to the report's filter string:

?category Is Null or [Category ID] In (?category)

parameters-multi-value-empty-value

Tip

You can also use the filter string shown above to filter report data at the data source level. Refer to this help article for more information: Filter Data at the Data Source Level.