1
votes

I have a question regarding to show more than one value to drop down but use only one value as a parameter

My query

select custcode, custname from customertable

in return i will have two columns.. at SSRS i want a single dropdown which will show me these two data, but once user select a value, it should pass only customer code to parameter, how to do that with SSRS

1
Just create another column concatenating both columns then use it as label and set custcode as value. select custcode + '-' + custname as label, custcode from customertablealejandro zuleta

1 Answers

1
votes

Parameters have two properties that are important - the Value and the Label. The Value is used as the parameter value in things like SQL expressions; the Label is what is displayed in the parameter selection box.

So we need to have two fields returned by our parameter lookup query in Available Values: the custcode which is used as the Value field and the concatenation of custcode and custname for the Label field.

select custcode, custcode + ' - ' + custname as Label
from custmertable