带有添加RowNumber功能的ssrs报告报告

时间:2018-03-20 05:32:16

标签: reporting-services ssrs-2008

我想像ssrs一样制作报告表

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(Nothing),

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

依旧......

你能否就这些抄写给我一些建议?

Regardz 感谢

1 个答案:

答案 0 :(得分:0)

您可以使用总计执行此操作。假设您的号码都是正数,那么只需检查借方/贷方列,并在需要时将该值乘以-1。

这样的事情应该有效。

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

如果您真的想要行号,那么您只需添加一个表达式为=RowNumber(nothing)的列