all groups > sql server reporting services > may 2006 >
You're in the

sql server reporting services

group:

Multi-value parameters


Multi-value parameters Mark
5/25/2006 12:01:02 PM
sql server reporting services:
I want to make certain parameters in my report multi-valued; however, for
some of those parameters, possible values include commas, as such:

Value 1: a,b,c
Value 2: 1,2,3

Reporting Services uses a comma as the delimiter, so the parameter list that
gets passed into the stored procedure is "a,b,c,1,2,3". This obviously won't
work.

Here's my question: can I change the delimiter to something other than a
comma? Failing that, is there a work-around for this problem?

Thanks,
RE: Multi-value parameters Yitzhak Khabinsky
5/25/2006 11:02:01 PM
It is possible.
Let's say your multivalued parameter is called MultiValuedList.
Define a second parameter and assign the following expression to it:
=join(Parameters!MultiValuedList.Value,"~")
By doing thar tilde will be your delimiter.
Pass your second parameter to a stored procedure.

Don't forget to check on prompt as Hidden for that second parameter.

Yitzhak Khabinsky

RE: Multi-value parameters Amarnath
5/25/2006 11:34:02 PM
You can use =Join(Parameters!Report_Parameter_0.Value,".") or any other thing
to join.

Amarnath

[quoted text, click to view]
RE: Multi-value parameters Mark
5/30/2006 10:00:02 AM
This works, except that I have 2+ cascading multi-value parameters, where the
selected items from one parameter are fed into the next parameter as input.
Here is the problem that arises from that scenario:

Suppose I have two multi-value report parameters, A and B, both of which are
populated by stored procedures. The selected items from A act as the input
for B. Heeding Yitzhak's advice, I add a parameter between A and B--let's
call it X. X merely combines the selected parameters from A into a string
(with a custom delimiter) so that they can be fed into B.

Ideally, after the values for A are selected by the user, X should then be
auto-populated, after which B should be populated by the database based on
the input of X. Unfortunately, Reporting Services apparently tries to
populate B before constructing X, causing an error.

Hopefully this makes sense. Is there anybody who can help with this problem?


[quoted text, click to view]
Re: Multi-value parameters Mark
5/30/2006 10:36:02 AM
Bruce,

I did have X between A and B, but I still got the error. (The error said B
was missing the parameter X). I've double-checked spelling and I didn't see
any typos. It might be that I'm misinterpreting what the problem is, but I
haven't found any evidence toward that end myself.


[quoted text, click to view]
Re: Multi-value parameters Bruce L-C [MVP]
5/30/2006 12:06:40 PM
Make sure that X shows up between A and B in the order of parameters.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: Multi-value parameters Bruce L-C [MVP]
5/30/2006 12:39:43 PM
Different issue I believe. Parameters are case sensitive. Make sure you have
the parameter name correct.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

AddThis Social Bookmark Button