简体   繁体   中英

ssrs expression or sql on display field

I have a table with 2 columns: code and description and data like this:

code   description
1      abc
2      zxv
3      otp

If I use SSRS expression, how to display description field when parameter code is selected.

Thank you.

For your expression

=iif(parameters!code = Fields!description.Value, Fields!description.Value) 

You want to compare the CODE Parameter with the CODE field and return the Description field if the expression is True . You'll also need to have an ELSE part for what to use when the Expression is False - I used an empty string ( "" ).

=IIF(Parameters!code.Value = Fields!code.Value, Fields!description.Value, "")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM