Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SSRS 2008 Parameters with multi value

Posted on 2010-11-18
3
Medium Priority
?
649 Views
Last Modified: 2012-05-10
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.



0
Comment
Question by:ovoehlers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 41

Accepted Solution

by:
ralmada earned 2000 total points
ID: 34167391
try
select * from yourtable
where (',' + @location + ',') like '%,' + LOC_ID + ',%'

Open in new window

0
 
LVL 41

Expert Comment

by:ralmada
ID: 34167403
so just to clarify the above will work for a variable @location without quotation marks.
0
 
LVL 3

Author Comment

by:ovoehlers
ID: 34167485
That did it, thanks for your help.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question