September 23, 2016 at 1:07 pm
How do i allow user to type in multi value parameter or leave blank then show all records in ssrs?
For example i have parameter ID, user can type multiple IDs in parameter field. If they leave the parameter blank then it will show all records.
Thanks in advance 🙂
September 23, 2016 at 1:17 pm
I don't know about the SSRS part of the equation, but if you're using a stored procedure to run the report, you can pass a delimited string parameter, then split it by the delimiter and use the resulting table to filter your report.
September 23, 2016 at 1:57 pm
I'm not sure if it changed in 2016.
The parameters have a property to allow multiple values. If you have a dataset for the available values of your parameter (strongly recommended), an option will appear to check all. That way, you don't have to worry about handling empty values.
If the query is embedded in the report, you could even use "WHERE myColumn IN( @MyParameter)". This isn't available in T-SQL, so if you're using a stored procedure follow Ed's advice. See the link on his signature about splitting strings.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply