SSRS中的多个IIF条件不起作用

时间:2016-02-25 13:52:25

标签: reporting-services ssrs-2008 ssrs-2008-r2

我在IIRS声明中使用SSRS时遇到了一些麻烦。 我的目标是根据 Beschikbare_datum.Value 字段中的值,为报表中的字段添加不同的操作。该声明实际上有效,但是当我添加最后一个IIF部分时,除了最后定义的动作之外,其余的动作不再起作用。任何帮助/提示将不胜感激。

我的陈述如下:

=IIF(Fields!Beschikbare_datum.Value =
"Beschikbaar","javascript:void(window.open('http://ncoi-synergy/synergytest/docs/WflRequest.aspx?BCAction=0&Type=3161&StartDate="&Fields!StartDate.Value & "','_blank'))",

IIF(Fields!Beschikbare_datum.Value = "(Voorlopig) Ingepland","MailTo:" & "aprins@ncoi.nl"  & "?Subject=" & "Aanpassing beschikbaarheid surveilleren "  & Fields!ExamenDatum.Value,

IIF(Fields!Beschikbare_datum.Value = "Beschikbaarheid reeds opgegeven","MailTo:" & "aprins@ncoi.nl"  & "?Subject=" & "Aanpassing beschikbaarheid surveilleren "  & Fields!ExamenDatum.Value, 

IIF(Fields!Beschikbare_datum.Value = "Uren / reiskosten declareren", "javascript:void(window.open('http://ogas01/synergyenterprise/docs/WflRequest.aspx?Mode=1&ID=%7b"& Fields!Declaratie_verzoek.Value.ToString & "%7d&BCAction=1','_blank'))"
    ,""))))

1 个答案:

答案 0 :(得分:0)

尝试使用switch语句:

=Switch(
Fields!Beschikbare_datum.Value="Beschikbaar",
  "javascript:void(window.open('http://ncoi-synergy/synergytest/docs/WflRequest.aspx?BCAction=0&Type=3161&StartDate="&Fields!StartDate.Value & "','_blank'))",

Fields!Beschikbare_datum.Value="(Voorlopig) Ingepland",
  "MailTo:" & "aprins@ncoi.nl"  & "?Subject=" & "Aanpassing beschikbaarheid surveilleren "  & Fields!ExamenDatum.Value,

Fields!Beschikbare_datum.Value="Beschikbaarheid reeds opgegeven",
  "MailTo:" & "aprins@ncoi.nl"  & "?Subject=" & "Aanpassing beschikbaarheid surveilleren "  & Fields!ExamenDatum.Value,

Fields!Beschikbare_datum.Value = "Uren / reiskosten declareren",
  "javascript:void(window.open('http://ogas01/synergyenterprise/docs/WflRequest.aspx?Mode=1&ID=%7b"& Fields!Declaratie_verzoek.Value.ToString & "%7d&BCAction=1','_blank'))",

true,""
)

如果有帮助,请告诉我。