Solved

SSRS 2008 Parameters with multi value

Posted on 2010-11-18
3
640 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
  • 2
3 Comments
 
LVL 41

Accepted Solution

by:
ralmada earned 500 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now