简体   繁体   中英

SSRS Multiple IIF expression using the same field

I'm using ssrs at the min, and writing a IIF expression. The report is running but not returning the field as I have set in the expression.

Here's the expression:

=IIF(Fields!TransCode.Value = "by", "Purchases Buy", Fields!TransCode.Value) =IIF(Fields!TransCode.Value = "ss", "Purchases Short Sale", Fields!TransCode.Value)=IIF(Fields!TransCode.Value = "sl", "Sale", Fields!TransCode.Value)=IIF(Fields!TransCode.Value = "cs", "Sale Cover Short", Fields!TransCode.Value )

Anyone know 'iif' I've missed something in this expression.

Have it sorted, dúr here forgot the & and to remove the second field from each expression within the main one.

Here's the expression just in case some else needs it.

=IIF(Fields!TransCode.Value = "by", "Purchases Buy", "") & IIF(Fields!TransCode.Value = "ss", "Purchases Short Sale", "") & IIF(Fields!TransCode.Value = "sl", "Sale", "") & IIF(Fields!TransCode.Value = "cs", "Sale Cover Short", "" )

Hope it comes in useful to someone.

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