在Microsoft Visual Studio中的字体更改表达式中使用多个Iif行的问题

时间:2015-04-06 20:54:03

标签: visual-studio-2010

我正在使用Microsoft Visual Studio 2010生成一个使用查询(连接到本地sql server)作为数据源的表。我试图在字体颜色上使用条件格式。

这有效:

=Iif(Fields!Status_RC.Value = "Open", "DarkBlue",
Iif(Fields!Status_RC.Value = "Work In Progress", "SeaGreen","Red"))

但这不是:

=Iif(Fields!Status_RC.Value = "Open", "DarkBlue",
Iif(Fields!Status_RC.Value = "Past Due", "Red",
Iif(Fields!Status_RC.Value = "Work In Progress", "SeaGreen","Red"))

我不明白为什么。 在此先感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

=Iif(Fields!Status_RC.Value = "Open", "DarkBlue", Iif(Fields!Status_RC.Value = "Past Due", "Red", Iif(Fields!Status_RC.Value = "Work In Progress", "SeaGreen","Red")))