I created a report to get all sales amounts with and without VAT value:
Customer - OnAfterGetRecord()
CLEAR(VatEntry);
VatEntry.SETCURRENTKEY(Type,“Posting Date”,“Document Type”,“Document No.”,“Bill-to/Pay-to No.”);
VatEntry.SETRANGE(“Bill-to/Pay-to No.”,Customer.“No.”);
IF VatEntry.FIND(’-’) THEN BEGIN
IF VatEntry.Amount <> 0 THEN;
TotAmount := VatEntry.Amount + TotAmount;
END;
With this I have the range I need, but know, I don’t know how do SUM all amont in this range.
With FIND(’-’) and FIND(’+’) I only get the first and the last amount.
But I need all amounts on this range???
Thanks