debet, credit, saldo in fast report
need advice, I want to make a statement of cash I have to calculate the balance constraint
so this is the case
================
debit | credit | balance
================
500 | 0 | 500
0 | 1000 | -500
750 | 0 | 250
existing data just continues to debit the same credit how to make a statement like that yes with sql server database. thank you
so this is the case
================
debit | credit | balance
================
500 | 0 | 500
0 | 1000 | -500
750 | 0 | 250
existing data just continues to debit the same credit how to make a statement like that yes with sql server database. thank you
Comments
write code in obp event of band to set the variables value.
Balance := Balance + ((<datasetname."debit">) - (<datsetname."credit">));
declare your variable at the top of the code page not within in the procedure.
you will also need to initialize the variable in a group header band.
The documentaction (I use one of 4.6 dated 2008) says about it in chapter 3.6 "Agregate functions".
If you use (see there are only TWO actual params to function SUM):
[SUM(<Groups."ItemsTotal">, MasterData1)]
then you get result like in the first picture. But if you use (see there are THREE actual params to function SUM):
[SUM(<Groups."ItemsTotal">, MasterData1,2)]
then you get result like in the second picture.
Mick
I didn't notice this should be print on masterband :-(
Mick