Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

GP AR Aging report

Posted on by Microsoft Employee

I want to create a customize AR Aging report in GP for multiple companies. I found the list of GP table.  But don't know exact table for report.

I have a following questions regarding it.

1. Can we use SSRS to generate this report?

2. I am using receivable tables to generate a report.  I want to connect multiple companies and generate single a report for an outstanding balance. Am I using correct table? Please suggest required table for the report.

3. Is anyone know how to map report value to table columns?

Thanks in advance.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP AR Aging report

    He John,

    Thank you for reply. I am using same query to fetch data.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP AR Aging report

    The 1st column as described above will help you to identify the name of the database and it can be written as something like this

    select

    'TWO' as "Database_Name",CM.CUSTNMBR Customer_ID, CM.CUSTNAME Customer_Name,

    CM.PYMTRMID Customer_Terms, CM.CUSTCLAS Customer_Class,

    CM.PRCLEVEL Price_Level,

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP AR Aging report

    Hi,

    I would like to respond to your questions -

    Victoria has done a wonderful work and have created the following SQL view for the aging report. If you would like you can run this report for any company. If there is a requirement to add multiple companies, please add an additional column (1st column) saying DB and hard code the name of the company there like TWO as "Database_Name". Once done you might have to change the tables to something like TWO..RM20101 to read data from many databases. Then union them all. Once done, you may apply filters in SSRS for a company or a range of companies to generate this report.

    The query written by Victoria is listed below or you may refer to http://victoriayudin.com/2012/01/25/sql-view-for-current-receivables-aging-in-dynamics-gp/

    create view view_Current_Receivables_Aging_Summary

    as

    select

    CM.CUSTNMBR Customer_ID, CM.CUSTNAME Customer_Name,

    CM.PYMTRMID Customer_Terms, CM.CUSTCLAS Customer_Class,

    CM.PRCLEVEL Price_Level,

    sum(case

    when RM.RMDTYPAL < 7 then RM.CURTRXAM

    else RM.CURTRXAM * -1

    end) Total_Due,

    sum(case

    when DATEDIFF(d, RM.DUEDATE, getdate()) < 31

    and RM.RMDTYPAL < 7 then RM.CURTRXAM

    when DATEDIFF(d, RM.DOCDATE, getdate()) < 31

    and RM.RMDTYPAL > 6 then RM.CURTRXAM *-1

    else 0

    end) [Current],

    sum(case

    when DATEDIFF(d, RM.DUEDATE, getdate()) between 31 and 60

    and RM.RMDTYPAL < 7 then RM.CURTRXAM

    when DATEDIFF(d, RM.DOCDATE, getdate()) between 31 and 60

    and RM.RMDTYPAL > 6 then RM.CURTRXAM * -1

    else 0

    end) [31_to_60_Days],

    sum(case

    when DATEDIFF(d, RM.DUEDATE, getdate()) between 61 and 90

    and RM.RMDTYPAL < 7 then RM.CURTRXAM

    when DATEDIFF(d, RM.DOCDATE, getdate()) between 61 and 90

    and RM.RMDTYPAL > 6 then RM.CURTRXAM * -1

    else 0

    end) [61_to_90_Days],

    sum(case

    when DATEDIFF(d, RM.DUEDATE, getdate()) > 90

    and RM.RMDTYPAL < 7 then RM.CURTRXAM

    when DATEDIFF(d, RM.DOCDATE, getdate()) > 90

    and RM.RMDTYPAL > 6 then RM.CURTRXAM *-1

    else 0

    end) [91_and_Over],

    CS.LASTPYDT Last_Payment_Date,

    CS.LPYMTAMT Last_Payment_Amount

    from RM20101 RM

    inner join RM00101 CM

    on RM.CUSTNMBR = CM.CUSTNMBR

    inner join RM00103 CS

    on RM.CUSTNMBR = CS.CUSTNMBR

    where RM.VOIDSTTS = 0 and RM.CURTRXAM <> 0

    group by CM.CUSTNMBR, CM.CUSTNAME, CM.PYMTRMID, CM.CUSTCLAS,

    CM.PRCLEVEL, CS.LASTPYDT,CS.LPYMTAMT

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP AR Aging report

    Sure Bill. I will do that.

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: GP AR Aging report

    Swani, if this works, publish the report code you created so that others with similar consideration may save a bit of time.

  • callen Profile Picture
    callen 4,595 on at
    RE: GP AR Aging report

    If the solution works, please mark the reply as an Answer. Good luck.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP AR Aging report

    Thank you very much callen.

    I will check Receivable transaction view.  I was thinking to use union clause, but now I will definitely consider that option to gather data from multiple companies.

  • callen Profile Picture
    callen 4,595 on at
    RE: GP AR Aging report

    You can definitely use SSRS to create a custom aging report. In fact, GP comes with SSRS-based Aged Trial Balance reports.

    To deal with multiple companies, you will need to create a query with union clauses to pull data from multiple tables or write your query to pull the data from multiple tables. Perhaps a stored procedure that enables you to cycle through the companies is the way to go.

    The ReceivablesTransactions SQL view will contain detailed transactions.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans