Question Status

Verified
Muhammad Moin Mubeen asked a question on 22 Mar 2014 11:03 PM

Dear All,

I am trying to print one journal in General journal window and getting the following error.

"Cannot edit a record in Print journal (LedgerJournalTmp).

The SQL database has issued an error."

other journals are printing fine. this particular journal has more than 500 lines.

any one please let me know the possible solution.

Regards,

Moin.

Reply
Verified Answer
Denis Macchinetti responded on 23 Mar 2014 2:29 AM

Hi Moin

The problem is on AccountName field of LedgerJournalTmp Table.

On AccountName field, change the ExtendedDataType from AccountName to DirPartyName.

The AccountName lenght is 60, instead DirPartyName is 100.

The field AccountName come from Name field of DirPartyTable table that have a stringsize greater than AccountName field.

Thanks & Regards

Denis Macchinetti

Senior Technical Architect

Reply
Suggested Answer
Denis Macchinetti responded on 23 Mar 2014 1:39 AM

Hi Moin

To find out where is generated this error, try to :

1- Disable CIL on your AX Option

2- Run the Report

3- Double Click on Infolog.

Now you can see the line of code that generate the error.

Please, move also here.

Thanks & Regards

Denis Macchinetti

Senior Technical Architect

Reply
Suggested Answer
Denis Macchinetti responded on 23 Mar 2014 1:39 AM

Hi Moin

To find out where is generated this error, try to :

1- Disable CIL on your AX Option

2- Run the Report

3- Double Click on Infolog.

Now you can see the line of code that generate the error.

Please, move also here.

Thanks & Regards

Denis Macchinetti

Senior Technical Architect

Reply
Muhammad Moin Mubeen responded on 23 Mar 2014 2:05 AM

Hi Denis,

Thanks for your reply.

I followed these steps to un-check the CIL.

Development Work space > Tools > Options > Development > Execute business operation in CIL.

It was previously checked, then I run the report and getting same error. this is the second line of error

"[Microsoft][SQL Server Native Client 10.0][SQL Server]String or binary data would be truncated."

and the third line is.

"SQL statement: UPDATE T1 SET ACCOUNTNAME=T4.NAME,ACCOUNTNUM=T2.DISPLAYVALUE,RECVERSION=? FROM tempdb."DBO".t10841_69B3F7D1F031409EBC810A2C719FD5DB T1 CROSS JOIN DIMENSIONATTRIBUTEVALUECOMBINATION T2 CROSS JOIN CUSTTABLE T3 CROSS JOIN DIRPARTYTABLE T4 WHERE ((T1.PARTITION=?) AND (T1.ACCOUNTTYPE=?)) AND ((T2.PARTITION=?) AND (T2.RECID=T1.LEDGERDIMENSION)) AND (((T3.PARTITION=?) AND (T3.DATAAREAID=?)) AND (T3.ACCOUNTNUM=T2.DISPLAYVALUE)) AND ((T4.PARTITION=?) AND (T4.RECID=T3.PARTY))"

waiting for your response.

Regards,

Moin.

Reply
Verified Answer
Denis Macchinetti responded on 23 Mar 2014 2:29 AM

Hi Moin

The problem is on AccountName field of LedgerJournalTmp Table.

On AccountName field, change the ExtendedDataType from AccountName to DirPartyName.

The AccountName lenght is 60, instead DirPartyName is 100.

The field AccountName come from Name field of DirPartyTable table that have a stringsize greater than AccountName field.

Thanks & Regards

Denis Macchinetti

Senior Technical Architect

Reply
Muhammad Moin Mubeen responded on 23 Mar 2014 3:01 AM

Thanks Denis it's solved.

Thanks & Best Regards,

Moin

Reply
Denis Macchinetti responded on 23 Mar 2014 3:02 AM

Your welcome

Have a nice day

Thanks & Regards

Denis Macchinetti

Senior Technical Architect

Reply