i have big problem in running total formula
first formula in group header to reset totals
WhilePrintingRecords;
global numberVar totalAmounInput := 0;
second formula in detail section here
WhilePrintingRecords;
global numberVar totalAmountInput;
if {StockDetail.Direction} > 0 then
totalAmountInput := totalAmountInput + {StockDetail.Amount}
i try everything but totalAmount does not reflect correct value. incorrectly add the last record twice
can you help?