• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 653
  • Last Modified:

SSRS 2008 Parameters with multi value

Hi guys. I'm trying to create a report in BIDS with SSRS 2008 that prompts the user for a location, the user can only choose one of three locations, but at the same time each choice has multiple values assigned to it.

The SQL query has this:

WHERE (LOC_ID IN (@Location))

Open in new window

I setup the report parameters as follows:
 Those are the labels and values assigned to eachLike that it doesn't work. But if i assign only 1 value to each label, it works fine.
And I also tried with quotation marks, (ex. '22', '23') and still doesn't work.

  • 2
1 Solution
select * from yourtable
where (',' + @location + ',') like '%,' + LOC_ID + ',%'

Open in new window

so just to clarify the above will work for a variable @location without quotation marks.
ovoehlersAuthor Commented:
That did it, thanks for your help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now