I have report which returns data from a SQL Server 2008. The user would like to be able to dynamically add filtering, e.g.
show me only data with Language = English, or show me only data for a given organizational unit or stuff like that. The number of filter criteria is big (almost 50).But how do I do that?? I have my report, with the basic query (SELECT (fields) FROM MyView WHERE ......) inside the report data set - how can I dynamically add filtering to that??
asked Jun 20, 2011 at 09:55 PM in Default
You should have a report parameter which should be passed on to the sql query or the stored procedure in the dataset.
You can create a report parameter with set of pre defined values or values from db.
This report parameter could be a check box or drop down box or text box.You could also set default values and data types of the report parameter.
The report parameter should then be mapped to the parameter in your stored procedure or your query.
Your query should be
select value from table where column = @filerparameter
In case you have multiple select in the report parameter thenselect value from table where column in (@filerparameters)