SSRS null parameter to return values

reporting-servicesssrs-2008

I have two reports bound to each other. On the first report when I choose a field I am lead to a second report showing only data from the row I selected in the first report. The second report is used for updating, therefore it takes in parameters. I have three text-boxes which allow a null value and a dropdown list.

First when I created the dropdown list and specified the values, and added a null value the report returned the row I selected in the first report with all the data. Now I tried to assign the values of the parameter to a database, but each time I get to this report it first asks to select a value from the dropdown and then it will display the data.

How can I add a Null value to the items retrieved from the DB so when null is selected as default then all values would be returned without any problems, and without any selection needed?

Best Answer

You would need to add a condition to your Dataset query to handle the NULL parameter. For example:

WHERE @Parameter is NULL or ColumnValue = @Parameter
Related Topic