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.



LVL 3
ovoehlersAsked:
Who is Participating?
 
ralmadaConnect With a Mentor Commented:
try
select * from yourtable
where (',' + @location + ',') like '%,' + LOC_ID + ',%'

Open in new window

0
 
ralmadaCommented:
so just to clarify the above will work for a variable @location without quotation marks.
0
 
ovoehlersAuthor Commented:
That did it, thanks for your help.
0
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.

All Courses

From novice to tech pro — start learning today.