0
votes

Hello i tried using both switch as well as iif function in ssrs report. I have a column(Delta) which has values and need to set image depending on column values. Below is my switch statement

=Switch(
        Fields!Delta.Value =0,"arrowzero.jpg",
        Fields!Delta.Value >0,"arrowup.jpg",
        Fields!Delta.Value <0,"arrowup.jpg",
        Fields!Delta.Value ="CNC","arrowblack.jpg"
       )

Switch statement is working for all cases except last case "CNC".

1

1 Answers

0
votes

A couple of observations that might help you fix this.

  1. You switch statement uses the same column however the first three evaluate it numerically, the last one against a string. Is this correct?

  2. Is the image called "arrowblack.jpg", is there a typo here?

  3. If the last option is supposed be act like an ELSE then you can replace Fields!Delta.Value ="CNC","arrowblack.jpg" with True,"arrowblack.jpg"