I use a split udf to do this. When you use SSRS to pass a multivalue parameter, it'll pass them all in a comma delimited string.
I do the split with the following (which I butchered from somwhere ages ago, apologies, but I haven't got an annotation):
Create FUNCTION [dbo].[Split_udf](@String nvarchar(MAX), @Delimiter char(1))
RETURNS @Results TABLE (Items nvarchar(MAX))
AS
BEGIN
DECLARE @index INT
DECLARE @slice nvarchar(MAX)
--Have to set to 1 to start with
SELECT @index = 1
WHILE @index !=0
BEGIN
--get the index of the first instance of the delimiter
SELECT @index = CHARINDEX(@Delimiter,@String)
--put everything to the left of the delimiter into the slice variable
IF @index !=0
SELECT @slice = LEFT(@String,@INDEX - 1)
ELSE
SELECT @slice = @String
--Put it into the result sel
INSERT INTO @Results(Items) VALUES(@SLICE)
--Cut the string now and put the rest back in
SELECT @String = RIGHT(@String,LEN(@String) - @index)
--If we've run out of characters, we're done!
IF LEN(@String) = 0 BREAK
END
RETURN
END
In your main query you would then need to put the following in the where cause:
fundid in (Select Items from dbo.Split_udf(@fundidlist, ','))
I wouldn't suggest using an "all" option, as SSRS will do this for you.
Hope that helps.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk