optional multivalue parameters
Hi, I want to develop a report where user can select from parameters. If nothing is selected the report should return all the data in the report. How can i handle this? How should I modify my query? If I give in the below format.. it is working fine when I pass single value. How should i handle for multiple parameters? select * from Table1 where ( column1 IN (:col1) or (:col1 IS null)) AND (column2 IN (:col2) OR (:col2 IS NULL)) col1 and col2 are multi value parameters.
April 26th, 2011 2:25pm

Setup some default values then you are able to see the Data without any parameter selection. For instance, you can setup default value is "ALL" for all of the parameters. Tarak
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2011 2:29pm

thanks for the reply Tarak, I should be able to handle it in the query not in parameter properties....
April 26th, 2011 2:31pm

I think you are able to select each single value but Not all of them. The reason behind this is your attributes has NULL values. To get rid of this NULL, I post an answer in your previous query. Just check it out and let me know if it works. There is another method just check the following link http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/5bf426d4-74a2-44a6-8d8e-dc252ba2808e/ This method directly shows ALL value in the parameter drop down list and it selects everything. But my method selects everything but wont show ALL as value in the parameter drop down list.
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2011 2:37pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics