If you’re creating an SSRS report, adding a parameter list with a sql statement (dropdownlist) in which you want the user to be able to choose multiple items in the dropdown list, and you get the error in the subject line, you should beware of two things.
In the SQL query, in your WHERE clause, instead of something like :
WHERE [FieldName] = @MyParam
use ‘In’ instead of ‘=':
WHERE ([FieldName] In (@MyParam))
The next thing is actually the biggest thing to know about. It actually tripped me up for hours until I found out that it does NOT work with Stored Procedures. The query must be an Ad Hoc/embedded query in the report.
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF
Leave a reply
You must be logged in to post a comment.