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 NAV (Archived)
Suggested answer

Overflow under conversion error in Navision

(0) ShareShare
ReportReport
Posted on by 2,582

Hi,

I have an action button in purchase order page which on clicking opens up the purchase order report. But while running the report, I get the following error:

Overflow under conversion of Microsoft.Dynamics.Nav.Runtime.Decimal18 value 1.500 to System.Int32

While running the debugger, the error stops at the 'Check report 1401' because I have coded for converting amount to words in my purchase order report.

How can I solve this error?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,237 Super User 2025 Season 2 on at
    RE: Overflow under conversion error in Navision

    Send the screeshot of the code you have added to convert the amount into text.

  • Tina Menezes Profile Picture
    2,582 on at
    RE: Overflow under conversion error in Navision

    This is my code:

    RepCheck.InitTextVariable;

    RepCheck.FormatNoText(NoText,"Purchase Header"."Amount to Vendor","Purchase Header"."Currency Code");

    AmountInWords:=NoText[1];

    Where I have defined,

    RepCheck as the 'Check' report,  NoText is a text variable of dimension 2 and AmountInWords is a text variable too defined under C/AL Globals.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,237 Super User 2025 Season 2 on at
    RE: Overflow under conversion error in Navision

    Hello,

    You could use the following code to get the value

    ChkTransMgt.FormatNoText(NoText,"Purchase Header"."Amount to Vendor",1033,"Purchase Header"."Currency Code") ;

    AmontInWords := NoText[1];

    Where ChkTransMgt is object of Report Check Translation Management

    Try the above code.

    Is Amount to Vendor is a decimal field ?

  • Tina Menezes Profile Picture
    2,582 on at
    RE: Overflow under conversion error in Navision

    Hello,

    There is no report in my system named as 'Check Translation Management'.

    The Check report which I used is a system report with ID 1401.

    Yes Amount to vendor is a decimal field

  • Suggested answer
    Suresh Kulla Profile Picture
    50,237 Super User 2025 Season 2 on at
    RE: Overflow under conversion error in Navision

    It is the report 10400.  Which country NAV version are you running ?

  • Tina Menezes Profile Picture
    2,582 on at
    RE: Overflow under conversion error in Navision

    I do not have this report.

    This is my Navision version 9.00.45778

    Actually my report runs for other purchase order records. But only for one record I get this error.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,237 Super User 2025 Season 2 on at
    RE: Overflow under conversion error in Navision

    Where exactly the debugger stops when it throws an error, the other possibility is it may not be because of this cutomization it could be something else. Do you have any other customizations ?

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at
    RE: Overflow under conversion error in Navision

    Hi

    You can use like

    CheckReport.InitTextVariable;

    CheckReport.FormatNoText(AmtinWords,"Purchase Header"."Amount to Vendor","Purchase Header"."Currency Code");

    Define variable as follows

    AmtinWords Text 200  (This need to define as Array)

    CheckReport Report 1401

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

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#2
SC666 Profile Picture

SC666 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans