Search code examples
reporting-servicesssrs-2012

SSRS How to provide multiple values to Query Parameter


Im trying to pass multiple parameters to a Shared DataSet. I am using visual studio and microsoft reporting services projects.

The query of the dataset is as follows

DataSetQuery

So the 'MC.MaterialTypeCode in (@MaterialTypeCode)' has the parameter that can contain multiple values.

I defined the parameter as follows:

DataSetParameters

In the report I am using this dataset and providing fixed parameters.

enter image description here

The idea is to use the same shared dataset with different report datasets. (SupplyPaper_A4_Tier1, SupplyPaper_A4_Tier2)

I'm trying to provide multiple parameters 'Roll', 'Cutsheet' but this does not seem to work.

Am I missing something?


Solution

  • You need to pass an array of values to the parameter so try this as the parameter value

    Click the fx button next to the parameter value field and then use this expression

    =SPLIT("Roll,CutSheet", ",")
    

    I've just tested this and it seems to work fine.