Friday, March 9, 2012

parameters in Reporting Services

When you are using a number of parameters in a report, how do you set it so that if a parameter is selected the query runs against that parameter, but if a parameter isn't selected, the query runs against all values for that parameter?

you should should give a default value to your parm(0 if it's int),then add to your sql script the condition...|||

Yes, if you are using dropdownlist you can add one more item which will redirect you to span all records. You can modify your parameter listing query like below

SELECT LanguageId, Code FROM Languages UNION SELECT 0, 'ALL'

If you are using textboxes then if you trim the value and get nothing then you can code your datasource code not to filter on that column.

Eralper

http://www.kodyaz.com

No comments:

Post a Comment