I have Sql database with following columns:
- AcccountName
- Debit
- Credit
- DR/CR
I set date range and account name criteria to generate the crystal report.
For example, if i select two date ranges from dtpickers and account name "CASH" from combobox present in crystal report form. it will generate me all cash transactions within selected date range.
What I want is while generating crystal report with one more columns containing running balance. what I have tried so far in formula field:
For debit credit calculation:
global numbervar Balance;
balance = 0;
if {Transactionss.DR/CR} = "DR" then
balance := balance +{Transactionss.Debit}-{Transactionss.Credit}
else
balance := balance+{Transactionss.Credit}-{Transactionss.Debit}
But it is not working. Moreover i also want to bring previous balance and connect this opening balance with this debit credit calculation.
Sample image:
"DR"
and your pictures says1
– James Z