Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Report Parameters Question

Author  Topic 

Brutoxx
Starting Member

21 Posts

Posted - 2005-03-09 : 13:05:20
One of my non-queried parameters requires three options, Y for yes, N for no (which are fields from the table) and the third option would be both,

So on my no-queried available values I have:
Label | Value
YES Y
NO N
BOTH (I am not sure what to put here!)

Not sure how to go around this....
Thank you!


Have a nice day!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-09 : 13:10:28
Just put in some value that your query is expecting. It can be anything really, your query or stored procedure just needs to expect this value.

Tara
Go to Top of Page

Brutoxx
Starting Member

21 Posts

Posted - 2005-03-09 : 13:22:19
They query expecting either a Y or a N,
Is there any way around it?

Have a nice day!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-09 : 13:26:19
You'll need to modify the query to be able to accept this both condition.

IF @SomeVar = 'B'
SELECT *
FROM SomeTable
WHERE SomeColumn = 'Y' OR SomeColumn = 'N'
ELSE
SELECT *
FROM SomeTable
WHERE SomeColumn = @SomeVar

This would need to be in a stored procedure.

Tara
Go to Top of Page

Brutoxx
Starting Member

21 Posts

Posted - 2005-03-09 : 14:49:46
Thank you for the light.

I Have rearenged my query but now I get the following error when I try to run:

An error has accorred.
Attempted to use an object that has ceased to exist.


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-09 : 15:03:44
Do you have the query wrapped in a stored procedure and are using the stored procedure in the report? It must be in a stored procedure to use this logic inside Reporting Services.

Tara
Go to Top of Page

burkecrosby
Starting Member

1 Post

Posted - 2008-08-12 : 17:14:17
a little late but i got the error ("object ceased to exist") as well. one of the datasets in my report had an "order by 1" clause that i changed to "order by [actualColumnName]" and it fixed this.

i seemed to remember seeing something during upgrade of sql2000 to sql2005 mentioning this.

bc
Go to Top of Page
   

- Advertisement -