I have a report that uses two multi-value parameters in the query.
@garageId and @createdYear are both set as multi-value parameters with a default value of zero(0).
If I run it in SQL Server Management Studio, like below, I get the expected results.
declare @garageId int = 121212;
declare @createdYear int = 0;
SELECT DISTINCT(ml.methodID) methodID, methodTitle
FROM methodList ml
INNER JOIN methodChallenge mc ON ml.methodID = mc.methodID
WHERE type = 1
AND (mc.garageId IN(@garageId) OR @garageId IN(0))
AND (ml.createdYear IN (@createdYear) OR @createdYear IN(0))
ORDER BY methodTitle
However, I go through the SSRS interace, and select multiple values from each parameter column, I get this error:
"An expression of non-boolean type specified in a context where a condition is expected, near ','."
It works fine if I only select one row from each parameter column, but I need to be able to select multiple rows.
How do you correctly format the query to accept all the possible choices between multi-valued paramets?
Thanks!