Hello.
I am using Reporting Services, Server 2008 r2.
I have queried instructions on this forum on how to have an optional date parameter with a null and everything I have tried still does not work. I want the user to be able to plug in a begin date and end date and pull the records back between those two values. However, if they leave the begin date and end date null, I want the report to bring back all records.
I have tried checking the Allow Null value on the parameter. I have put an expression in the Tablix filter for begin date >= IIf(param!begindate.value = " ", "1/1/1900", param!begindate.value) and end date <= IIf(param!enddate.value = " ", "1/1/1900", param!enddate.value). I have also put in my query in the where statement that
(field.date = @begindate or @begindate is null)
and (field.date = @enddate or @endate is null).
I have tried different combinations of these statements, however, I do not get any records back. If I take out these parameters on the report, the report works fine.
I am frustrated with this and really could use some help. Thank you very much.