0
votes

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.

1

1 Answers

0
votes

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.