3
votes

I have an SSRS report . I use a parameter as a dropdownlist and I have populated the dropdownlist with a dataset.

The query in the dataset is as follows

 select Id, Name from Product;

I use Id for the Value and Name for the Label in the dropdownlist.

I also have a text box on the report. I would like to populate the text box with the label of the dropdownlist.

So as soon as the dropdownlist is changed and view report is pressed , the textbox value needs to be updated to the dropdownlist value. Does anyone know how it can be done ?

1

1 Answers

3
votes

To display a parameter value in a textbox in a report, use an expression like:

=Parameters!MyParameter.Label

Where MyParameter is the name of your parameter.

For a multi-valued parameter, use:

=Join(Parameters!MyParameter.Label, ", ")

Here you are using the Join function to turn the array of selected value labels into a string to display.

See Parameters Collection References for some more examples.