I was be able to output a crystal report and this is about accounting logic.
some of the column appear in my crystal report is eg.
accountname debit credit
cash..........1000...300
I want the column debit minus column credit (1000-300) if the result is positive (+) then 700 will appear in that debit column If the result is negative (-) then the value appear in credit column and i wan to remove the negative sign. So above value 1000 and 300 is not what i wan to show and debit or credit will be 0 eg
accountname debit credit
cash...........700......0
Above case is ok so far and now i end up like this In crystal report formula editor i have @creditbalance, and inside it has formula:
if Sum ({Entries.Debit}, {Entries.AccountName})>Sum ({Entries.Credit}, {Entries.AccountName}) then formula= Sum ({Entries.Debit}, {Entries.AccountName})-Sum ({Entries.Credit}, {Entries.AccountName}) end if
So it can give me as i wanted to show (the 700 and 0 part) The problem is i create another formula @TotalDebitBalance
Sum ({@DebitBalance})
It error said "This field cannot be summarized", Then how to sum up the value i get from @debitBalance.
Note: @TotalDebitBalance i plan to put it at report footer section where all grant total usually placed there, where @debitbalance i put it at Group Header section.