【问题标题】:SSRS Pass Total Number of Rows from Master to SubreportSSRS 将总行数从主报表传递到子报表
【发布时间】:2021-01-19 20:19:47
【问题描述】:

我有一个 SSRS 报告,其中包含一个带有表格的母版页,该表格将行数据从表格传递到子报告。

我还想将表中包含的总行数传递给子报表。

我尝试在母版页上同时使用这两种方法设置变量:

=CountRows("Assessment") 

=Max(Fields!ROWNUM.Value, "Assessment")

但是当我尝试将变量传递给子报表时,我得到了错误:

Error       [rsCyclicExpressionInReportVariable] The Variable(TOTAL_ROWS) expression for the report contains a direct or indirect reference to itself.  Loops in variable value expressions are not allowed.

如果我尝试将这些表达式中的任何一个直接放入子报表的参数表达式(子报表属性 -> 参数,然后是 fx),我会收到错误:

Exception of type 'Microsoft.Reporting.Services.ReportProcessing+DataCacheUnavailableException' was thrown

知道如何获得传递给子报表的总行数吗?

【问题讨论】:

    标签: visual-studio-2019 ssrs-2019


    【解决方案1】:

    就这样过去了

    =Max(Fields!ROWNUM.Value, "Assessment")
    

    因为参数表达式确实有效,但如果您收到“DataCacheUnavailableException”,则需要删除文件“MasterFileName”.rdl.data 以从根本上清除报表数据缓存。

    【讨论】:

      猜你喜欢
      • 2016-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-30
      相关资源
      最近更新 更多