Service 需要SSRS嵌套IIf的正确语法

Service 需要SSRS嵌套IIf的正确语法,service,reporting-services,nested,reporting,iif,Service,Reporting Services,Nested,Reporting,Iif,我有下面的表达。有人能告诉我为什么打印0吗 =IIF(Parameters!StartMonth.Value <= 1 And Parameters!EndMonth.Value >= 1, ReportItems!txtTotal1.Value, IIF(Parameters!StartMonth.Value <= 2 And Parameters!EndMonth.Value >= 2, ReportItems!txtTotal2.Value, IIF(Parame

我有下面的表达。有人能告诉我为什么打印0吗

=IIF(Parameters!StartMonth.Value <= 1 And Parameters!EndMonth.Value >= 1, ReportItems!txtTotal1.Value, 
IIF(Parameters!StartMonth.Value <= 2 And Parameters!EndMonth.Value >= 2, ReportItems!txtTotal2.Value,
IIF(Parameters!StartMonth.Value <= 3 And Parameters!EndMonth.Value >= 3, ReportItems!txtTotal3.Value, 0)))

谢谢

在我看来,如果参数!StartMonth.值大于3,您的对账单将返回0。

我也这么认为,所以我尝试将该0更改为123123,但它仍然打印0而不是123123。您的起始月和结束月值是什么?我的起始月和结束月值范围为1到12。基本上,我使用开始月份和结束月份逻辑来动态隐藏报告中的列。我把这个公式放在Totals列中。如果我只放第一行,它就会得到所需的值。但只要我再加一行,它就会显示0。我也用SWITCH语句尝试了这一点。