change color depending on value SSRS

寵の児 提交于 2019-12-11 01:56:02

问题


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:

how can I change the color of the values?


回答1:


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.

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")


来源:https://stackoverflow.com/questions/34724228/change-color-depending-on-value-ssrs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!