May 20, 2014 at 12:13 am
Hi all,
I have just done a report in Report Builder 3.0. I also created a second set of "DataSet2" to create a Parameter which links to the "DataSet2".
Now, the users can type the "USER ID" in the Parameter box to filter-out the report produced from "DataSet1" using the parameter and the filter I created under “Dataset 1”. By far its working fine.
But, is there a way to manipulate the Parameter so that if the user doesn't type any value or tick “allows NULL” box the report produces the complete report without any filtering. Instead of throwing an error at this moment (image attached)...
In another words I want an optional Parameter not a mandatory Parameter. Thanks in advanced.
I have found something on the web. But not really sure where exactly to use it?
"WHERE (@USERID IS NULL) OR (USER ID = @userid)"
This is still not working when I put them in "Dataset 2"? I am using "Dataset 2" to run the parameter...Am I missing something? BTW “USER ID” is the field name which I am renaming from the original field name using AS.
I am also using a filter under the "dataset 1" which point to the parameter @userid...What am I doing wrong here?
Cheers.
May 20, 2014 at 3:43 am
FYI....the problem been solved now...cheers everyone...:rolleyes:
March 26, 2015 at 12:15 pm
Try this, in SQL Statement:
WHERE
(<table field name> LIKE @<parameter> OR @<parameter> IS NULL)
This works for me, easy and clean.
Edit: In parameters properties check the box "Allow Null Vallues", just this and will work. 😉
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply