OneThinker
OneThinker

Reputation: 11

SSRS Expressions Iif

I have to write an IIf or Switch in SSRS expressions which satisfy the below condition

If the field value is positive it should display "Dr" next to the value If the field value is negavtive it should display "Cr" next to the value If the value is 0 then no value should be displayed in the field

for example a value of -100 should be displayed as ' 100 Cr ' (excluding quotations) and a value of 100 should be displayed as ' 100 Dr ' and a value of 0 should be displayed as " " (ie blank)

i am new at this

Upvotes: 0

Views: 617

Answers (1)

Chris Latta
Chris Latta

Reputation: 20560

You are talking about presentation rather than data. Accordingly I wouldn't use an IIF function for the Value expression, I would use the Format property. Leave the Value just being the field and use a format like: #,##0 Dr;-#,##0 Cr;

The first part of the format is the part that displays positive numbers, the second part displays negative numbers and the last part displays zero value.

Upvotes: 2

Related Questions