Documentation() Sales Invoice Line - OnPreDataItem() IF NOT SETCURRENTKEY("Job No.","Document No.") THEN BEGIN SETCURRENTKEY("Document No."); IF NOT AlreadyDisplayedMessage THEN BEGIN MESSAGE('This report will run much faster next time if you add a key to '+ 'the %1 table (113) which starts with %2,%3', TABLENAME,FIELDNAME("Job No."),FIELDNAME("Document No.")); AlreadyDisplayedMessage := TRUE; END; END; CurrReport.CREATETOTALS("Cust. Ledger Entry"."Amount (LCY)","Cust. Ledger Entry"."Remaining Amt. (LCY)"); Sales Invoice Line - OnAfterGetRecord() SETRANGE("Document No.","Document No."); FIND('+'); SETRANGE("Document No."); SalesInvoiceHeader.GET("Document No.");
Documentation() Cust. Ledger Entry - OnPreDataItem() SETRANGE("Customer No.",SalesInvoiceHeader."Bill-to Customer No."); CurrReport.CREATETOTALS("Amount (LCY)","Remaining Amt. (LCY)"); Cust. Ledger Entry - OnAfterGetRecord() IF PrintAmountsInLocal THEN BEGIN OriginalAmtToPrint := Amount; BalanceToPrint := "Remaining Amount"; PaymentsOrAdjustment := Amount - "Remaining Amount"; END ELSE BEGIN OriginalAmtToPrint := "Amount (LCY)"; BalanceToPrint := "Remaining Amt. (LCY)"; PaymentsOrAdjustment := "Amount (LCY)" - "Remaining Amt. (LCY)"; END; Cust. Ledger Entry - OnPostDataItem()
Answers
I think you have to use CALCFIELDS for Cust. Ledger Entry
Albert
Is it a property problem?