Monday, March 19, 2012
Choosing several items from a Pick list
Does anyone know how to pick more than one item from a pick list (drop down
box.)
E.g if I had the months of the year in the pick list how could I select Jan
and Feb'
Any ideas greatfully recieved.
Regards
Munish
--
Technical Data Analyst
Hammersmith & W London CollegeAs fas as I know you cannot do this with the normal report parameters list,
you need to write code to handle the multi select and call the reporting
services web service. I think it is a lot of effort, and I havent seen any
example code.
I think RS 2005 has this multi select functionality included.
"Munish RaasmaanDaas" wrote:
> Morning All,
> Does anyone know how to pick more than one item from a pick list (drop down
> box.)
> E.g if I had the months of the year in the pick list how could I select Jan
> and Feb'
> Any ideas greatfully recieved.
> Regards
> Munish
> --
> Technical Data Analyst
> Hammersmith & W London College
Tuesday, February 14, 2012
checkboxlist and SQL search using AND/OR on selected checkboxlist items.

I have a checkbox list like the one above. For example, Training OR Production – should include everyone with an Training OR everyone with a Production checked OR everyone with both Training and Production checked. If service AND technical support – just those two options will show – the customer can only have those 2 options selected in their account and nothing else. Is there an easy way to build the SQL query for this scenario? Any suggestions or tips?Thank you for any help
You can create a procedure that accepts a parameter ('AND' or 'OR), which perform a query based on the parameter:
create proc sp_testQuery @.logicOP varchar(3)='AND',@.id int,@.name varchar(20)
as
if @.logicOP='AND'
select * from t1 whereid=@.id and name=isnull(@.name,name)
else if @.logicOP='OR'
select * from t1 whereid=@.id orname=@.name
else raiserror('You must choose a logic operator ''AND'' or ''OR''',16,1)
go
sp_testQuery 'AND',1,null
Then what your code need to do is just call the stored procedure with providing all required parameters that come from your website.