error in execution of multiselect parameter report in VS 2005

  • when i execute my report,having one of the filter (location) as multi select parameter it gives error stating Must Declare the scalar variable '@location' .

    I have declared in report parameters but i still getting this error, But when i select only one value from multi select parameter filter, it doesn't show any error and got executed.

    Plz sort out the problem..

    thanx..

  • Reporting Services passes multi select parameters as a comma delimited list, so depending on how you have it set up, it will most likely fail.

    If you're using a hard coded sql string in your data set on the RS side, you can do something like (don't remember the exact syntax)

    Where Value in (RSParmName), and since it replaces it with a string, you're fine.

    If you are calling a SP passing in the parms, you'll have to split out the comma separated list and handle it appropriately.

    There are plenty of threads on here showing how to split comma delimited strings.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply