【问题标题】:SSRS syntax error with countdistinct iifcountdistinct iif 的 SSRS 语法错误
【发布时间】:2018-05-24 01:22:36
【问题描述】:

我有一个 SSRS 报告,我想在其中计算较大查询的特定结果(总体总计 - 然后是“打开”总数和“关闭”总数)。我正在尝试使用表达式:

=CountDistinct(IIF(Fields!CaseStatusCode.Value='OPEN', Fields!CaseID.Value, Nothing))

但每当我运行报告时,我都会得到:

textrun 'Textbox24.Paragraphs[0].TextRuns[0]': ')' 的值表达式中存在语法错误。

我已经添加和删除了多个),但错误仍然存​​在。我还尝试了不同文本框中的表达式,但错误仍在继续(只是更改了它所在的文本框的名称)。我错过了什么?

【问题讨论】:

  • 解决了。显然我应该使用 " 而不是 '。

标签: sql reporting-services syntax-error ssrs-2014


【解决方案1】:

解决了。显然我应该使用 " 而不是 '。更正了下面的代码。

=CountDistinct(IIF(Fields!CaseStatusCode.Value="OPEN", Fields!CaseID.Value, Nothing))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-05
    • 1970-01-01
    相关资源
    最近更新 更多