In my SSRS 2008 R2 report I have a multi-value @Status parameter. This is the dataset:
SELECT 1 AS ID, Description
FROM [ApplicationStatus]
WHERE StatusID IN (5, 6, 11, 14)
UNION
SELECT 2 AS ID, Description
FROM [ApplicationStatus]
WHERE StatusID IN (10)
In my main ReportData dataset I have the following filter:
WHERE ((@Status IN (1) AND a.StatusID IN (5, 6, 11, 14))
OR (@Status IN (2) AND a.StatusID IN (10)))
The report runs fine when selecting either 1 and 2 as the value in the @Status drop-down, but when I select the built-in '(Select All)' option, I get the following error message:
Query execution failed for dataset 'ReportData'. An expression of non-boolean type specified in a context where a condition is expected, near ','.