Answered by:

First(Fields!Department.Value, "ds")

Question

In a report, We want to make sure that a heading is displaced based on the parameters selected by the user. This was working so well when a user was not allowed to select multiple values from a drop down list. Now that a user can now choose multiple values
we keep getting error(#Error) An attempt to remedies it see us getting just the first value in the parameter drop down list.

Answers

If I understand correctly, the report works well when the user select a value from a drop-down list of a single parameter. While when the signal parameter changes to multiple parameter, then we will get #error in the report after selecting multiple values
from the drop-down list. If I have misunderstood, please don't hesitate to let me know.

In Reporting Services, if the parameter is a signal parameter, we can directly use the expression below to display the parameter in the report.

=Parameters!parameter_name.Value

While if the parameter is a multiple parameter, we should use join function as below to display the parameter in the report:

=join(Parameters! parameter_name.Value,",")

So in your scenario, I suggest that you should double check the two parameters in the report, then use the correct format in the expression.

All replies

If I understand correctly, the report works well when the user select a value from a drop-down list of a single parameter. While when the signal parameter changes to multiple parameter, then we will get #error in the report after selecting multiple values
from the drop-down list. If I have misunderstood, please don't hesitate to let me know.

In Reporting Services, if the parameter is a signal parameter, we can directly use the expression below to display the parameter in the report.

=Parameters!parameter_name.Value

While if the parameter is a multiple parameter, we should use join function as below to display the parameter in the report:

=join(Parameters! parameter_name.Value,",")

So in your scenario, I suggest that you should double check the two parameters in the report, then use the correct format in the expression.

The Join statement provided by Katherine does that. It joins the selected values of the multivalue parameter with ",". So if you have a multivalue parameter with 6 allowed values, 1, 2, 3, 4, 5, 6, and you select only 1 and 5, Katherines formula will display
"1,5". You may wish to modify hers to =join(Parameters! parameter_name.Value,", "). Note I added a space after the
comma used for the join character. With this change, my example will display "1, 5" instead of "1,5".

"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.