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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Customer Aging Form Display information

(0) ShareShare
ReportReport
Posted on by 25

Does any one know how the data is being display from the CustVendAgingStatistics form? I'm trying to display the aging information on another form, but the tmp table just ends up being empty for me, even though it's grabbing all of the information in the back end.

Please let me know of any suggestions. Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    304,508 Super User 2026 Season 1 on at

    Hi kaz3594,

    When opening the statistics form, the temporary table will be filled with x++ coding calling a class with calculations. You can review on the CustVendAgingStatistics form how this is done.

    Usually start look at methods as init() and run() where a class will be initiated.

  • kaz3594 Profile Picture
    25 on at

    Hey André,

    Thank you so much for your speedy response. I guess I'm just confused as to how the aging data is displayed on the CustVendAgingStatistics form. The code seems to be clearing the tmp table after the code goes through each aging period. I'm seeing the data inserted into tmp table in the base code CustVendAgingStatistics.calcStatistic() :

    void calcStatistic()

       {

           StatRepIntervalLine statRepIntervalLine;

           StatRepInterval statRepInterval;

           int i;

           QueryRun queryRun;

           Query query = new Query();

           QueryBuildDataSource qbds;

           TmpStatPer tmpStat;

           delete_from tmpAccountSum;

           qbds = query.addDataSource(tablenum(TmpStatPer));

           statRepInterval = StatRepInterval::find(defName);

           switch (statRepInterval.PrintDirection)

           {

               case ForwardBackwardPrinting::Forward:

                   qbds.addSortField(fieldnum(TmpStatPer, LineNum), SortOrder::Ascending);

                   break;

               case ForwardBackwardPrinting::Backward:

                   qbds.addSortField(fieldnum(TmpStatPer, LineNum), SortOrder::Descending);

                   break;

           }

           queryRun = new QueryRun(query);

           queryRun.setCursor(tmpStatPer);

           i = 0;

           while (queryRun.next())

           {

               tmpStat = queryRun.getNo(1);

               select Heading, LineNum from statRepIntervalLine

                   where statRepIntervalLine.LineNum == tmpStat.LineNum

                   && statRepIntervalLine.Name == defName;

               i++;

               tmpAccountSum.clear();

               tmpAccountSum.AccountNum = custVendTable.AccountNum;

               tmpAccountSum.TransDate = tmpStatPer.StartDate;

               tmpAccountSum.SortDate = tmpStatPer.EndDate;

               tmpAccountSum.Txt = statRepIntervalLine.Heading;

               tmpAccountSum.Balance01 = this.calcInvoiceBalanceByDate();

               tmpAccountSum.Balance02 = this.calcPaymentBalanceByDate();

               tmpAccountSum.Balance03 = this.calcOpenBalanceByDate();

               tmpAccountSum.Balance04 = statRepIntervalLine.LineNum;

               tmpAccountSum.IsCustAccount = isCustAccount;

               tmpAccountSum.insert();

           }

           this.calcTotals();

       }

    I would appreciate any extra help in understanding this logic and where the information could be pulled from to populate the CustVendAgingStatistics form. Thank you.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans