Solved

SSRS 2008 Parameters with multi value

Posted on 2010-11-18
3
644 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 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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

762 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