'All' 过滤报告导致错误“[BC30516] 过载解析失败”

'All' filter on report causing error "[BC30516] Overload resolution failed"

我正在尝试向报告添加过滤器。 I thought this would give me all records when “All” is selected since the filter wouldn’t take effect and if it didn’t = “All” then it would kick off the filter.

‌=iif(Parameters!vType.Value <> "All", iif(Parameters!vType.Value = "Red", "Red", iif(Parameters!vType.Value = "Green", "Green", "Yellow")))

我认为这行得通,但我收到了这条消息:

The FilterValue expression for the dataset "Dashboard_Test' contains an error: [BC30516] Overload resolution failed because no accessible 'Iif' accepts this number of arguments. 

我检查了逗号、括号等,没有发现任何错误。谁能告诉我这条消息是什么意思?

你的第一个 iif 需要一个条件,如果为真,试试这个作为例子:

=iif(参数!vType.Value(0) <> "All", "Green", iif(参数!vType.Value(0) = "Red" , "Red", iif(参数!vType.Value(0) = "Green","Green","Yellow")))

我不太确定您要实现的目标,但希望这对您有所帮助。