web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to set report filter

(0) ShareShare
ReportReport
Posted on by

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 

8272.Capture.PNG

Thanks & Regards,

Ashwini.E

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    You've not posted the report dataset structure here, so it's quite difficult to imagine what you have done.

    Are you sure that in OnPreDataItem you have a value for DetailedCustomerLedgerEntry."Cust. Ledger Entry No."? You can have that only if CustLedgerpostings  is an indented dataitem related to DetailedCustomerLedgerEntry.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans