Hi Experts,
I want to set the report filters, below code i have used in cust ledger entry predataitem but i cant get the correct value please help me on this one.
CustLedgerpostings - OnPreDataItem()
SETRANGE("Posting Date",Date2,Date1);
SETRANGE("Date Filter",Date2,Date1);
SETRANGE("Entry No.",DetailedCustomerLedgerEntry."Cust. Ledger Entry No.");
CustLedgerpostings - OnAfterGetRecord()
DetailedCustomerLedgerEntry.RESET;
PostingAmount2 := 0;
REPEAT
DetailedCustomerLedgerEntry.RESET;
DetailedCustomerLedgerEntry.SETRANGE("Cust. Ledger Entry No.",PostedEntries."Entry No.");
DetailedCustomerLedgerEntry.SETRANGE("Posting Date",Date2,Date1);
IF DetailedCustomerLedgerEntry.FINDSET THEN
BEGIN
REPEAT
//PostedEntries.CALCFIELDS("Remaining Amount");
PostingAmount2 += DetailedCustomerLedgerEntry.Amount;
// MESSAGE('%1',PostingAmount2);
UNTIL DetailedCustomerLedgerEntry.NEXT= 0;
END;
UNTIL PostedEntries.NEXT= 0;
but last filter is not applying SETRANGE("Entry No.",DetailedCustomerLedgerEntry."Cust. Ledger Entry No.");
please tell me i can i give filter from DetailedCustomerLedgerEntry table to custledger entry predataitem
Thanks & Regards,
Ashwini.E
*This post is locked for comments