SSRS System.Object[] Parameter Error when Allowing Multiple Values

Sql Server Reporting Services lets you select multiple values for a parameter, but you may have some trouble when first setting it up.  The example error below is for a text field.  It will be slightly different for different data types, such as integer, but the fix is the same.

Example Allow Multiple Values setting:

SSRS Allow Multiple Values

SSRS Allow Multiple Values

Example error:

An error occurred during locat report processing.
An error has occurred during report processing.
The processing of FilterExpression for the dataset ‘YourDataset’ cannot be performed. Cannot compare data of types System.String and System.Object[]. Please check the data type returned by the FilterExpression.

SSRS Data Types Error

SSRS Data Types Error

 

This error occurs because the data is converted into an array when allow multiple values is selected.

Luckily, the fix for this is simple.  Open your dataset properties and change the operator on your filter from an equals sign ‘=’ to the word ‘in.’

Change from operator ‘=’

SSRS Incorrect '=' Setting

SSRS Incorrect ‘=’ Setting

Change the operator to ‘In.’

SSRS Change Operator to 'In'

SSRS Change Operator to ‘In’

This will change the data type to an array so that your report will run with multiple values.

Comments are closed.