Last post Feb 17, 2011 01:15 AM by Nishantg
Feb 09, 2011 03:19 PM|Apocolyptica|LINK
I have and .rdl report and within my query I was evaluating if the parameter was entered by
However, when I switched my parameter to have multiple values from a query, this no longer works I get a "incorrect syntax near ','"
Isn't @Parm a string?
Thanks for the help
Feb 16, 2011 05:40 PM|FileFoundException|LINK
When you have a multi-value parameter it's replaced in your query by a comma separated list of values.
So your IF statement will look like
If('value0','value1',.... > '') which is not a valid SQL.
So try using coalesce
If COALESCE(@param,'') <> ''
Feb 17, 2011 01:15 AM|Nishantg|LINK
If you are using a multivalue parameter then the value is of string type but it is a collection of strings, so you can't use like you have mentioned, instead you have to check like the following
If (Len(Join(Parameters!ParameterName.Value, ",") ) >0)
-- user selected some value from your multivalue list