Hi everyone
I am new into navision Programming and I'm requested to write a codeunit to convert number to word urgently, such as convert 1234.56 to one thousand two hundred thirty four dollars and fifty six cents... (maximum upto 900 millions ) Can anyone help?
Comments
Enter a payment and select Payments/Preview Check.
You should see that your amount was converted into words.
The functions that are doing that are found in Report 1401 Check.
Also take a look at the form 404 Check Preview to see how previous report is called.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
if you want to display the "Amount" field (as example) in text format then, creat a recordset of 1401 ("Check" Report), then a text variable of maximum length. With this you must also creat a recordset of "Gen. Journal Line" (so tht currency matches).
then call this function,
CheckReport.InitTextVariable;
CheckReport.FormatNoText(NUMBERTEXT,ROUND(Amount,0.01,'>'),GenJnlLine."Currency Code");
where CheckReport is recordset for "Check" Report and GenJnlLine is for "Gen. Journal Line" .
Thank you all for the valuable infomation. I followed your instructions and finished the report.
Thanks again.[/quote]