all groups > sql server reporting services > january 2007 >
You're in the

sql server reporting services

group:

non-queried param problem


non-queried param problem Debralous
1/31/2007 11:14:58 AM
sql server reporting services:
I know there have been a bunch of posts re: setting a param to 'All'.
I have done this successfully when using a query param but an using a
non-queried list for this project and the methods I've used in the
past such as " (cy.Division IN (@Div) OR '(All)' in(@Div)) " in the
dataset do not work. I get an error stating that I can't convert
'all' to an int data type.

I also tried doing multi-select but get a 'SQL error near ','"
message. I only have two actual values for the parameter plus all.

I've someone could please tell me how to get this going I'd appreciate
it.

Debra
Re: non-queried param problem Bruce L-C [MVP]
1/31/2007 1:35:03 PM
You are confusing what is shown versus the value. If the parameter is an
integer then when putting in the parameter lis have the label be All and the
value be some value that your data never is (like 0 or a negative or
something). The important thing here is that the value cannot exist in your
data.

Then you can still do this:
select * from sometable where (somefield = @MyParam or @MyParam = 0)

Note that the 0 is whatever you have made the All parameter value be (-1,
9999, etc).


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: non-queried param problem Debralous
2/1/2007 7:33:03 AM
Thank you so much. Obvious once you point it out! I appreciate you
taking the time!
AddThis Social Bookmark Button