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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Customer aging report issue

(0) ShareShare
ReportReport
Posted on by 6,609

Good morning,

We are experiencing an issue running the AR Customer aging report. Unless the "Exclude zero balance accounts" parameter is checked on, the report run will fail with the following. 

Message (06:48:37 am)
Cannot execute a data definition language command on Calculated result of aging process (CustVendAgingCalculatedTmp).
The SQL database has issued an error.
SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]String or binary data would be truncated.
SQL statement: INSERT INTO tempdb."DBO".t104017_540ADBAD7D644158BAEFD021FDBBF5C9 (ACCOUNTNUM,TXT,RECVERSION,PARTITION) SELECT T1.ACCOUNTNUM,T1.NAME,1,5637144576 FROM tempdb."DBO".t12143_369C81839C1E43DAB23CB384D1BD2865 T1 WHERE (T1.PARTITION=5637144576) AND NOT (EXISTS (SELECT 'x' FROM tempdb."DBO".t104017_F69B0013ACDC4FAABE860D445BF38A54 T2 WHERE ((T2.PARTITION=5637144576) AND (T1.ACCOUNTNUM=T2.ACCOUNTNUM))))

The failure only happens when running the Customer aging report in a particular company; all other companies work fine regardless of whether the "Exclude zero balance accounts" check box is checked or not. 

I tracked down the 'zero balance' param controlling an insert_recordset statement in CustAgingCalculation.postProcess() but I'm not sure what it does. I removed the insert portion of the statement and printed out the name and text. From what I can tell, the company with the issue may have issues with special characters (e.g., '#') in the data. I'm still looking through the infolog output trying to find a pattern but if anyone can offer any thoughts I'd appreciate it.

Thank you.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    venkatesh vadlamani Profile Picture
    3,180 on at

    I assume that its trying to insert list of customers who have zero balances to append to the result set. But Is there any mismatch in the insert_recordset  in terms of strings field sizes

    For example Txt field has size of 60 charecters . But may be the dirPartyNames are assigned which can be max of 100 charecters. This will throws errors.

    This happened in LedgerTrialBalance in the versions Ax 6.2 Cu7 when customer is used as dimension and any one of the customers had a name larger than 60 characters.

  • bankk Profile Picture
    6,609 on at

    Hi Venkatesh,

    You're absolutely right. While waiting on a response for this post I went looking into it further, we had one record name which was larger than 60 characters long. I've verified it in a test environment but need to validate it elsewhere.

    Thank you!

  • venkatesh vadlamani Profile Picture
    3,180 on at

    You are welcome. Please mark the post as answered once you validate it

  • bankk Profile Picture
    6,609 on at

    Confirmed that was the source of the issue. Thank you again.

  • Vinesh Tandel Profile Picture
    590 on at

    root cause was found. How was it fixed though ?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans