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 GP (Archived)

Performance of PM Historical Aged Trial Balance (HATB)

(0) ShareShare
ReportReport
Posted on by 576

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

I have the same question (0)
  • kdd281 Profile Picture
    469 on at
    RE: Performance of PM Historical Aged Trial Balance (HATB)

    How about using SSRS?

  • Marc K Profile Picture
    576 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
    469 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
    576 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

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans