【问题标题】:I have a SSRS calculation but i do not know how to get it to work in SSRS我有一个 SSRS 计算,但我不知道如何让它在 SSRS 中工作
【发布时间】:2022-08-18 06:18:36
【问题描述】:

等式 TotalDebits = result.CreditsAndDeposits + result.Refund - result.RentTax - result.SalesTax - result.Insurance

如何在 SSRS 中进行计算? 我的数据表结果 任何想法都会很棒。

    标签: reporting-services ssrs-2016


    【解决方案1】:

    您可以参考文本框的值来计算公式。

    TotalDebits = ReportItems!CreditsAndDeposits.Value + ReportItems!Refund.Value - ReportItems!RentTax.Value - ReportItems!SalesTax.Value - ReportItems!Insurance.Value

    我在猜测文本框的名称。我可能会在文本框名称前加上“DT”或“MTD”等,以引用它所在的列。

    https://docs.microsoft.com/en-us/sql/reporting-services/report-design/built-in-collections-reportitems-collection-references-report-builder?view=sql-server-ver16

    【讨论】:

    • 我会给你我的桌子结构的屏幕截图
    【解决方案2】:

    我能够通过输入一个表达式来解决这个问题。 =SUM(IIF(Fields!strType.Value="CreditsAndDeposits",CInt(Fields!intDT.Value),CInt(0)))

    + SUM(IIF(Fields!strType.Value="Refunds", CInt(Fields!intDT.Value),CInt(0)))

    SUM(IIF(Fields!strType.Value="租金税",CInt(Fields!intDT.Value),CInt(0)))

    - SUM(IIF(Fields!strType.Value="销售税",CInt(Fields!intDT.Value),CInt(0)))

    - SUM(IIF(Fields!strType.Value="保险成本",CInt(Fields!intDT.Value), CInt(0)))

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-10-05
      • 1970-01-01
      • 2021-08-22
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      • 2015-03-03
      • 1970-01-01
      相关资源
      最近更新 更多