0
votes

I am creating a report...
Its a kind of Ledger Report.. I am displaying the report Groupwise by Name.
See the below image displaying the error...

enter image description here Now see the red marking in the image...
I created the formula shown below..

d_ClosBal

WhilePrintingRecords;
NumberVar ClosBal1;
ClosBal1 := 0;
ClosBal1 := Sum({@DebitAmt}) - Sum({@CreditAmt});

IF ClosBal1 > 0 then ClosBal1 else 0;

c_ClosBal

WhilePrintingRecords;
NumberVar ClosBal1;
ClosBal1 := 0;
ClosBal1 := Sum({@DebitAmt}) - Sum({@CreditAmt});

IF ClosBal1 < 0 then ClosBal1 else 0;

And Placed formula in the yellow mark shown in the figure below...

enter image description here

The Sum({@DebitAmt}) is 5740.00 and Sum({@CreditAmt}) = 800.00 shown in figure

The blue marked are the Transactions, ex 1000.00, 945.00, etc.... I even tried putting a formula reseting the value of ClosBal1 to 0 inside GroupHeader but ain't helped.

Suggest me any solutions..

1

1 Answers

0
votes

you need to indicate your group levels in this statement otherwise you are just grouping the entire report.

ClosBal1 := Sum({@DebitAmt}) - Sum({@CreditAmt});

example

ClosBal1 := Sum({@DebitAmt},{companyname}) - Sum({@CreditAmt},{companyname});