【发布时间】:2019-11-28 14:26:34
【问题描述】:
我正在使用报表生成器 3.0 尝试根据用户选择的参数获取动态标题。
错误
textrun 的值表达式 'Textbox29.Paragraphs[2].TextRuns[0]' 包含错误:[BC32017] 逗号、')' 或预期的有效表达式继续。
使用此 SWITCH 语句时出现此错误
=SWITCH(
Parameters!LineCalled.Count = 3, "All Lines",
Parameters!LineCalled.Count = 2, "Both Notts Lines",
Parameters!LineCalled.Count = 1 AND
Parameters!LineCalled.Value = "01156842190", "Order Line",
Parameters!LineCalled.Count = 1 AND
Parameters!LineCalled.Value = "01156842191", "Overflow Line",
Parameters!LineCalled.Count = 1 AND
Parameters!LineCalled.Value = "393607", "Belfast Line"
)
或者这个IIF
=IIF(Parameters!LineCalled.Count = 3, "All Lines",
IIF(Parameters!LineCalled.Count = 2, "Both Notts Lines",
IIF(Parameters!LineCalled.Count = 1 AND
Parameters!LineCalled.Value = "01156842190", "Order Line",
IIF(Parameters!LineCalled.Count = 1 AND
Parameters!LineCalled.Value = "01156842191", "Overflow Line",
IIF(Parameters!LineCalled.Count = 1 AND
Parameters!LineCalled.Value = "393607", "Belfast Line","Other"
)))))
我错过了什么?
【问题讨论】:
-
导致错误的参数的值是什么?是一种组合还是全部组合?
标签: reporting-services switch-statement iif-function