Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Report Display like this
1/5/2015 Opening Balance 184.00
1/5/2015 Receipt 500.00
1/5/2015 Issue 184.00

Total 500.00

2/5/2015 Opening Balance 184.00
2/5/2015 Receipt 500.00
2/5/2015 Issue 584.00

Total 100

How to get the result. i have write the formula

SQL
Global NumberVar MontQty;

if {Ledger_item.type} = "Receipt" then
    MontQty := MontQty + ToNumber({Ledger_item.quantity})
else if {Ledger_item.type} = "Opening Balance" then
    MontQty := MontQty + ToNumber({Ledger_item.quantity})
else
    MontQty := MontQty  - ToNumber({Ledger_item.quantity})


it is not working . first group is ok. second group total value get 600(500+100). i want only 100
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900