【发布时间】:2014-10-28 20:43:13
【问题描述】:
如何将 [HowManyTrucks] 和 TextBox11 值相乘并将其存储在 TextBox33 中。
[HowManyTrucks] 是数据集中的一个字段。 TextBox11 是通过减去 [BasePrice] 和 [DiscountValue] 计算得出的值
【问题讨论】:
标签: reporting-services ssrs-2008 report ssrs-2008-r2
如何将 [HowManyTrucks] 和 TextBox11 值相乘并将其存储在 TextBox33 中。
[HowManyTrucks] 是数据集中的一个字段。 TextBox11 是通过减去 [BasePrice] 和 [DiscountValue] 计算得出的值
【问题讨论】:
标签: reporting-services ssrs-2008 report ssrs-2008-r2
要完全按照您的要求进行操作,请在 TextBox33 中使用以下公式: =SUM(Fields!HowManyTrucks.Value) * ReportItems!TextBox11.Value
话虽如此,我还是建议您将 TextBox11 和 TextBox33 中的值作为计算列实际移动到数据集中。
SELECT
HowManyTrucks
,BasePrice
,DiscountValue
,BasePrice - DiscountValue AS PerTruckDiscountedPrice
,(BasePrice - DiscountValue) * HowManyTrucks AS TotalDiscountedPrice
FROM OrderTable
随着您开始向单元格中添加公式,长期管理 SSRS 报告变得更加困难。使用这种方法,如果您需要更改这些单元格的逻辑,您可以在数据集中进行,它将级联到可能使用此逻辑的报表的其他部分。
【讨论】: