I am creating a report in SSRS and have a parameter for the end users to search for an account number. Within the report the parameter is set to null by default to show all accounts. When the parameter is not null the user should be able to type in a single account or multiple accounts separated by commas. My problem is when I try to type in multiple accounts I get this error:
"An expression of non-boolean type specified in a context where a condition is expected, near ','."
Here is my sql query:
SELECT * FROM test_db WHERE (AccountNumber IN (@Account)) OR (@Account IS NULL)
The code on the parameter for @Account is
=IIF(IsNothing(Parameters!Account.Value),Parameters!Account.Value,Split(Parameters!Account.Value,","))