Within my SSRS report I am passing three parameters The Third parameter (which is a Search parameter) allows null value as well as multiple values. Reports giving results by passing null values or by passing one value to the third parameter, but throwing error when we pass more than 1 value in the third parameter.
I am using query below in the dataset to handle this case
IF (@Parameter3 = '')
BEGIN
SELECT *
FROM [MyTableName] WITH(NOLOCK)
WHERE col1 IN (@Parameter1)
AND col2 IN (@Parameter2)
END
ELSE
BEGIN
SELECT *
FROM [MyTableName] WITH(NOLOCK)
WHERE col1 IN (@Parameter1)
AND col2 IN (@Parameter2)
AND col3 IN (@Parameter3)
END
Here Parameter 3 is used to pass null as well as multiple Values.