0
votes

I have a multi value parameter I get from a query. I pass it to my dataset and it works like a champ. The dataset parameter uses join, i.e., =JOIN(Parameters!CodeList.Value,",").

So far so good. However when I pass this to a subreport, the subreport seems to only "get" the first item in the list instead of the string.

Also, if I put a textbox on my main report that looks at the CodeList parameter, i.e., =Parameters!CodeList.Value(0), I just see the first item. Using JOIN here returns an error.

I clearly don't get something here. Any available illumination?:)

2
its the (0), that is killing your work. Remove that & use Join, same as you discussed.Aditya

2 Answers

0
votes

How about this ?

=Parameters!CodeList.Value(0) gives you the first selected parameter value

=Parameters!CodeList.Value(1) gives you the second selected parameter value

so on

&

Join(Parameters!CodeList.Value,",")

will give you the all selected value for the parameter seperated by ,

Condition is, parameter should exists lol'z.

0
votes

Assuming that you want it to behave identically to your dataset in this report (I.E. you want to send a string containing all the values in your parameter separated by a comma), you just need to pass the same thing to the SubReport's parameter:

=JOIN(Parameters!CodeList.Value,",")

If what you actually want is for the Parameter in your SubReport to have the same values as the Parameter in your main report, you need to pass:

=Parameters!CodeList.Value

Note the absence of the (0) at the end. The (0) on the end of it will cause it to pass only the first value in the parameter which isn't what you're after.