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.
DebraYou 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
"Debralous" <debras@.ehtc.com> wrote in message
news:1170270898.588687.306440@.q2g2000cwa.googlegroups.com...
>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
>|||Thank you so much. Obvious once you point it out! I appreciate you
taking the time!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment