all groups > sql server reporting services > april 2005 >
You're in the

sql server reporting services

group:

Report Parameters



Report Parameters Sampson
4/22/2005 11:09:03 AM
sql server reporting services: In the report parameters dialogue box I have set up a Non Queried list, when
someone selects Grand Rapids(label) I want to return multiple values, 21 OR
22 OR 23, these are the Grand Rapids Department ID's. Can this be done? If
so what is the correct syntax?

Label Value
Grand Rapids 21 OR 22 OR 23


WHERE (Acclaim.Staff.DepartmentID = @DepartmentID)
Re: Report Parameters Bruce L-C [MVP]
4/22/2005 1:40:11 PM
That will not work.You would think it would but it doesn't (most likely on
purpose to prevent injection attacks). You can do a dynamic query. Go into
generic query mode and do this:
= "Select blah from sometable where (Acclaim.Staff.DepartmentID in (" &
Parameters!DepartmentID.value & ")"

Of course if it is not a list of integers you then need to add parse this
(you could write code behind to do this) and put in the single quotes.

The other alternative is pass the parameter to a stored procedure and do it
from there.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: Report Parameters Wayne Snyder
4/22/2005 2:20:18 PM
Why not make it a string parameter that returns "21,22,23"

and make the where clause like:
WHERE (Acclaim.Staff.DepartmentID in @DepartmentID)
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)

I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
[quoted text, click to view]

AddThis Social Bookmark Button