2
votes

I try to change the value color of my report.

Green if the value is greater than 85 Red if the value is less than 70 yellow if the value is greater than 70

I tried it with the Switch statement:

  =SWITCH(Fields!System.Value < 70, "Red", Fields!System.Value > 70, "Yellow", Fields!System.Value >= 85, "Green")

But it shows not the changing of color but it shows me this here:

enter image description here

how can I change the color of the values?

1

1 Answers

5
votes

You defined an expression for the value of the TextBox, which isn't what you want. Simply display the value in the TextBox like you would for any other cell.

You should define an expression in the TextBox Fill or Fontproperties. Depending on what exactly you wish to color.

As an example I'll show you how to change the background color.

TextBox Fill Property

You can navigate to the above menu by rightclicking the cell and selecting "Text Box Properties...". Then simply define the same expression for Fill color

=SWITCH(Fields!System.Value < 70, "Red", Fields!System.Value > 70, "Yellow", Fields!System.Value >= 85, "Green")