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

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Generating Customer Aging Report from multiple companies in NAV

(0) ShareShare
ReportReport
Posted on by 127

Hello All,

I have this one requirement where I have to generate customer aging report from multiple companies. All the customer have same code and name in both of the companies. So, I want to develop the report where it displays the aging details from both of the companies irrespective of which company I run. Is there any suitable way to do this?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Andrey Baludin Profile Picture
    3,941 on at
    RE: Generating Customer Aging Report from multiple companies in NAV

    Hi! You need to use CHANGECOMPANY function:

    docs.microsoft.com/.../changecompany-function--record-

    For example:

    IF Company.FINDFIRST THEN REPEAT
      Customer.CHANGECOMPANY(Company.Name);
      CustomerLedgerEntry.CHANGECOMPANY(Company.Name);
      IF Customer.FINDFIRST THEN REPEAT
        CustomerLedgerEntry.SETRANGE("Customer No.", Customer."No.");
        IF CustomerLedgerEntry.FINDSET THEN
        ....
        UNTIL CustomerLedgerEntry.NEXT = 0;
      UNTIL Customer.NEXT = 0;
    UNTIL Company.NEXT = 0;

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans