1
votes

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?

2
@Jeroen I agree with you, and I am aware that this tool is not meant to be used for updates, but it's mainly a temporary solution so I will have to go with it since time is short.Farkiba

2 Answers

1
votes

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
0
votes

Working with NULL valued parameters, I usually use this syntax:

WHERE ColumnValue = COALESCE(@Parameter, ColumnValue)