ssrs reporting报表加RowNumber功能

ssrs reporting report with addition RowNumber function

我想在ssrs中这样举报table

row  D/C          nominal saldo

1   Credit        10      10
2   Debet         1       9 (from 10-1)
3   Credit        6       15 (from 9+6)    

如何使函数 "saldo" 字段如上?

the logical flow
when row number = 1 then saldo = nominal (just for first row).  
when row number = 2 and  D/C = Debit then "saldo" row 1 - nominal  
when row number = 2 and  D/C = Credit then "saldo" row 1 + nominal  
when row number = 3 and  D/C = Debit then "saldo" row 2 - nominal  
when row number = 3 and  D/C = Credit then "saldo" row 2 + nominal

我正在尝试使用函数 RowNumber(无),

Iif(RowNumber(nothing)=1,Fields!nominal.Value),
Iif(RowNumber(nothing)=2 and Fields!dc.Value = "Debit",previousFields!saldo.Value - Fields!nominal.Value ), 

等等..

你能给我关于那个抄写员的建议吗?

注视 谢谢

您可以用 运行 的总数来做到这一点。假设您的数字都是正数,那么只需检查 debit/credit 列并在需要时将值乘以 -1。

像这样的东西应该有用。

=RunningValue(Fields!nomial.Value * (IIF(Fields!dc.Value="Debit",-1,1) ,Sum,”yourDataSetName”)

如果你真的想要行号,那么你可以添加一个表达式设置为 =RowNumber(nothing)

的列