Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Performance of PM Historical Aged Trial Balance (HATB)

Posted on by 570

When we implemented GP, the accounting team selected the Payables Historical Aged Trial Balance (HATB) report as one to run at month end.  They really like being able to run the report as of the last day of the prior month after all the payments have been recorded.  10 years of data later and the report is taking forever to run.  When I tested, it took 9 minutes.  If I run the Steve Gray version of PM HATB, it completes in 6 seconds. 

I looked into the stored procedures behind the report, pmHistoricalAgedTrialBalance and pmPrintHATBGetDocuments, and they are a case study of how not to write SQL code.  They use multiple nested loops and dynamic SQL.  The proper thing to do would be to refactor the code using SQL coding best practices.  I thought of opening a case with Microsoft and politely asking them to fix this.  But it seems like they don't really want to touch much legacy code.  Refactoring this would need a lot of testing and they probably would think the risk of introducing calculation errors is not worth it.

Has anyone found a solution to keep this report running well?  We have GP and SQL running on good hardware.  (And as I mentioned, properly written code completes in 6 seconds.)  Any chance opening a support case would have Microsoft cheerfully refactoring the code for the next release?

*This post is locked for comments

  • Marc K Profile Picture
    Marc K 570 on at
    RE: Performance of PM Historical Aged Trial Balance (HATB)

    Please consider voting.  :)

    https://experience.dynamics.com/ideas/idea/?ideaid=f62afe0b-6626-e911-9461-0003ff68a4b1

  • kdd281 Profile Picture
    kdd281 465 on at
    RE: Performance of PM Historical Aged Trial Balance (HATB)

    I would open a ticket with MS to see what they say,

    Post a product improvement suggestion : experience.dynamics.com/.../list;viewId=feb96173-d81b-e811-8108-3863bb2bca60&forum=771cc5ac-c117-e811-8105-3863bb2e0320&category=&mf=

    Its just cleaning up the code so they may go for it.

  • Marc K Profile Picture
    Marc K 570 on at
    RE: Performance of PM Historical Aged Trial Balance (HATB)

    I've never been a big fan of SSRS with GP.  It seemed like integration was minimal and that we'd have to separately manage SSRS security.  If I were to do something custom, I'd probably make a SmartList.

  • kdd281 Profile Picture
    kdd281 465 on at
    RE: Performance of PM Historical Aged Trial Balance (HATB)

    How about using SSRS?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,986 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,623 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans