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
 Multivalued Parameters

Author  Topic 

charles101
Starting Member

16 Posts

Posted - 2007-03-01 : 20:49:01
I have the following multivalued parameter called 'destination' with the following Non queried values

Label Value
Worsley Worsley
Collie collie
Muja collie

I have the following SQL dataset

select * from [outbound samples]
where destination = @destination

When I run the report the mulitvalued parameters are checkboxes,
(Select All)
Worsley
Collie
Muja

However I can only check one box otherwise if more boxes are checked, the report gets an error

Query execution failed for data set 'dataset1'
Must declare the scalar variable "@destination"


I was hoping for a way where I can check mulitple parameter values and the returning report takes this into account and dynamically places it into the WHERE clause

e.g if i select Collie and Muja

the report should return

select * from [outbound samples]
where destination = 'Collie' or 'Muja'

Is this possible or is there a way off doing it differently.

thanks

charles101
Starting Member

16 Posts

Posted - 2007-03-01 : 21:35:32
where destination IN (@DESTINATION)
Go to Top of Page
   

- Advertisement -