Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 根据SSRS值更改颜色_Reporting Services - Fatal编程技术网

Reporting services 根据SSRS值更改颜色

Reporting services 根据SSRS值更改颜色,reporting-services,Reporting Services,我尝试更改报表的值颜色 如果该值大于85,则为绿色 如果该值小于70,则为红色 如果该值大于70,则为黄色 我用Switch语句进行了尝试: =SWITCH(Fields!System.Value < 70, "Red", Fields!System.Value > 70, "Yellow", Fields!System.Value >= 85, "Green") =开关(字段!System.Value70,“黄色”,字段!System.Value>=85,“绿色”)

我尝试更改报表的值颜色

如果该值大于85,则为绿色 如果该值小于70,则为红色 如果该值大于70,则为黄色

我用Switch语句进行了尝试:

  =SWITCH(Fields!System.Value < 70, "Red", Fields!System.Value > 70, "Yellow", Fields!System.Value >= 85, "Green")
=开关(字段!System.Value<70,“红色”,字段!System.Value>70,“黄色”,字段!System.Value>=85,“绿色”)
但它显示的不是颜色的变化,而是我看到的:


如何更改值的颜色?

您为文本框的值定义了一个表达式,这不是您想要的。只需在文本框中显示值,就像在其他单元格中一样

您应该在文本框
Fill
Font
属性中定义表达式。具体取决于您想要的颜色

作为示例,我将向您展示如何更改背景色

通过右键单击单元格并选择“文本框属性…”,可以导航到上述菜单。然后简单地为填充颜色定义相同的表达式

=开关(字段!System.Value<70,“红色”,字段!System.Value>70,“黄色”,字段!System.Value>=85,“绿色”)
=SWITCH(Fields!System.Value < 70, "Red", Fields!System.Value > 70, "Yellow", Fields!System.Value >= 85, "Green")