Modifying the AX 2012 Customer or Vendor Aging Reports

By Becky Newell | January 28, 2014

I recently modified the customer aging report in AX 2012 and I can tell you the report is difficult to follow.  There are several class hierarchies and temp tables involved and it is easy to get lost in them.  While making my way through the aging puzzle, I took the notes below.  I hope you find them valuable if you are ever making modifications to the customer or vendor aging reports.  Enjoy!

In the class and method CustAgingReportDP\processReport on line 85 there is this line:

custVendBalanceList.calculateDetailsForMultipe(qr, contract.parmIncludeAmountCur());

The line above calls out to the CustBalanceList class which inherits from CustVendBalanceList.  In method calculateDetailsForMultiple in CustBalanceList on line 5 there is this line:

custVendAgingCalculateTmp = agingCalculation.process(_queryRun);

That lines calls out to the process method in the CustVendAgingCalculation class.  The process method is a driver method in which the data is collected that is later displayed in the report.  The process method is a good place to set your breakpoints.  On line 14 of the CustVendAgingCalculation\process method it collects all of the customers (or vendors) the report is going to look at.  This is the line of interest:

this.insertCustVendData(_custVendQuery);

On line 20 of CustVendAgingCalculation\process it grabs the open and closed transactions that will be displayed in the report.  If you look at the CustVendAgingCalculation\selectTransactions method you will see it has two separate calls:

this.selectClosedTransactions();

this.selectOpenTransactions();

Both the selectClosedTransactions and selectOpenTransactions methods query the CustVendTrans and CustVendTransOpen tables for data.  The methods insert what they find into a CustVendAgingProcessingTmp table.  The details for the transactions are collected in the CustVendAgingProcessingDetailsTmp table and then both the CustVendAgingProcessingTmp and CustVendAgingProcessingDetailsTmp tables are combined into a single CustVendAgingCalculatedTmp temp table in the CustVendAgingCalculation\process method.  Once everything has been pulled together, the CustVendAgingCalculatedTmp table is returned to the CustBalanceList\calculateDetailsForMultiple method.

Next in the CustBalanceList\calculateDetailsForMultiple method the insertIntoTmpAccountSum method is called.  In the insertIntoTmpAccountSum method the contents of the CustVendAgingCalculatedTmp table are inserted into a CustTmpAccountSum temp table.  At the very end of the CustBalanceList\insertIntoTmpAccountSum method the TmpAccountSum is an instance of the AccountSumMap.  The map is set equal to the CustTmpAccountSum table.  The mappings on the AccountSumMap map translate the fields in the CustTmpAccountSum table to an instance of the TmpAccountSum temp table.

The TmpAccountSum table is then used by the CustAgingReportDP\processReport method on line 90 with this call:

this.insertCustAgingReportTmp(reverseAmountsAndHeadings)

The contents of the TmpAccountSum are inserted into a CustAgingReportTmp table and this temp table is what is returned to the SSRS report design.

Related Posts

Recommended Reading:

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article
5.5.22 Dynamics GP

The Real Story about the Long-Term Future of Dynamics GP Support

I’ve seen a number of people put forward comment that Dynamics GP is going away and you have to get […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Financial Enhancements

The Dynamics 365 Businses Central 2022 Wave 1 Release has a lot of new and exciting features to help your […]

Read the Article
4.29.22 Dynamics GP

Dynamics GP Transaction Removals: Bank Reconciliation

  This is part 2 of a 3 part series on Dynamics GP Transaction Removals. These quick tips will hopefully […]

Read the Article
4.28.22 Dynamics GP

Uncommonly Used Features – Integrate Purchasing and Payables to Fixed Assets in Dynamics GP

Being able to integrate Purchasing and Payables to Fixed Assets in Dynamics GP will help you create visibility for your […]

Read the Article

New Features in the Dynamics 365 Business Central 2022 Wave 1 Release – Ease-of-Use Features

  There are many new features in the Dynamics 365 Business Central 2022 Wave 1 Release to get excited about! […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X