Hi Guys,
In this article, we will see how to display amount in words in Microsoft Dynamics Business Central. Here, I am taking an example of Report object which is widely used in Navision for converting decimal amount field into words.
Procedure :-
Step-1
Declare the following Global Variables :
where, (1) RepCheck is a variable of Report DataType Named as "Check" which is 1401.
(2) NoText is a variable of DataType "Text" with array Dimension value as 2 which is defined as shown above.
(3) AmountInWords is a variable of DataType "Text" which will store final result of amount in words.
Step-2 Now, add the following code in OnAfterGetRecord() trigger of DataItem containing that decimal field value.
So in my custom Purchase Order Report, i am adding code in the Purchase Header (DataItem) - OnAfterGetRecord() trigger.
Here, I have rounded off the Amount to 2 decimal places and also define the "Currency Code" available in "Purchase Header" Table.
Basically "Currency code" varies from transaction to transaction and it also impacts on "Amount In Words" value. If Currency code is not available it may also be denoted as blank as ' '.
Step-3
Now get the variable "AmountInWords" under the DataSource "Purchase Header" in the report and display it in the design layout of Report as shown below.
After updating Layout & Code and running the report Amount will be displayed in Words as shown in below
Output:Thanks for Reading😊
Very helpful
ReplyDeleteThanks!!
DeleteRegards
Kunal Huria
hi Kunal Sum is not printing it print first Columns Amount only how to get sum as words
DeleteStill I'm getting 25/100 as Cents
ReplyDeleteYou have to do some changes in Check Report (1401) to print decimal value in words. If you need more help plz share your mail ID for code reference.
DeleteThanks!!
yes please , tell me the changers , tharukaofficial@gmail.com
DeleteHello Kunal
DeletePlease I need the reference code as well.
tayoismail@gmail.com
Thanks
Still I'm getting 25/100 as Cents , Need Code
ReplyDelete[Email : tarunsingh962272@gmail.com]
Can you please share me customized code to ravuri.suresh59@gmail.com
ReplyDelete