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
Sql SSRS自定义颜色不适用_Sql_Reporting Services_Charts - Fatal编程技术网

Sql SSRS自定义颜色不适用

Sql SSRS自定义颜色不适用,sql,reporting-services,charts,Sql,Reporting Services,Charts,我有我正在应用到我的SSRS甜甜圈图表的自定义颜色 唯一的问题是它没有应用指定的颜色。据我所知,它只是使用默认值 我是不是错过了一个场景 我在系列属性>填充>(样式=实心)>颜色表达式中应用它,如下所示: =Switch(Fields!WCode.Value = 102, "Aqua", Fields!WCode.Value = 103, "Red", Fields!WCode.Value = 104, "Yellow", Fields!WCode

我有我正在应用到我的SSRS甜甜圈图表的自定义颜色

唯一的问题是它没有应用指定的颜色。据我所知,它只是使用默认值

我是不是错过了一个场景

我在系列属性>填充>(样式=实心)>颜色表达式中应用它,如下所示:

=Switch(Fields!WCode.Value = 102, "Aqua",
        Fields!WCode.Value = 103, "Red",
        Fields!WCode.Value = 104, "Yellow",
        Fields!WCode.Value = 105, "LightGrey",
        Fields!WCode.Value = 106, "Purple",
        Fields!WCode.Value = 107, "HotPink",
        Fields!WCode.Value = 108, "Maroon",
        Fields!WCode.Value = 109, "Khaki",
        Fields!WCode.Value = 110, "DarkOliveGreen",
        Fields!WCode.Value = 111, "Plum",
        Fields!WCode.Value = 113, "Pink",
        Fields!WCode.Value = 117, "Lime",
        Fields!WCode.Value = 118, "Orange",
         "White")
我已经清理了解决方案,还删除了项目文件夹中的项目数据文件

我不知所措,非常感谢您的帮助。

试试:

=Switch(Fields!WCode.Value = 102, "Aqua",
        Fields!WCode.Value = 103, "Red",
        Fields!WCode.Value = 104, "Yellow",
        Fields!WCode.Value = 105, "LightGrey",
        Fields!WCode.Value = 106, "Purple",
        Fields!WCode.Value = 107, "HotPink",
        Fields!WCode.Value = 108, "Maroon",
        Fields!WCode.Value = 109, "Khaki",
        Fields!WCode.Value = 110, "DarkOliveGreen",
        Fields!WCode.Value = 111, "Plum",
        Fields!WCode.Value = 113, "Pink",
        Fields!WCode.Value = 117, "Lime",
        Fields!WCode.Value = 118, "Orange",
        true,"White")

如果有帮助,请告诉我。

你是我的英雄!“真实的意义是什么?”马杜斯达维尔,不客气。如果我的回答解决了你的问题,你可以肯定地结束这个问题。@MardusDavel它不像
If…THEN…ELSE
,在
switch()中没有
ELSE