Yes.. SSRS doesn't function with passing multivalue params to procs out of the box.. however, with some minor code efforts you can do it..
if you wanted to build a report off of the northwind db to pick customers from multiple countries..
where the proc to take in and parse multivalues.. I am sure it could use work..
Anyway.. I never though of using XML.. thanks for the tip
create proc [dbo].[multivalueinputproc] (@country nvarchar(1024)=null)
as
set nocount on
declare @countrytable table(Code nvarchar(75))
if IsNull(@country, '')=''
Begin
set @country='ALL'
End
--print @country
Else
While Len(@country) > 0
Begin
If patindex('%,%', @country)> 0
Begin
insert into @countrytable
values (rtrim(substring(@country, 1, patindex('%,%', @country)-1)))
set @country = ltrim(substring(@country, patindex('%,%', @country)+1, 1024))
End
Else
Begin
insert into @countrytable
values (ltrim(rtrim(@country)))
break
End
End
--print @country
if (select @country) = 'ALL'
Begin
select * from customers
End
Else
Begin
select * from customers
where country in (select * from @countrytable)
Order by country
End