Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to convert the amount number into word Post Reply Post New Topic
Author Message
shiloh
Newbie
Newbie


Joined: 13 Oct 2011
Online Status: Offline
Posts: 26
Quote shiloh Replybullet Topic: How to convert the amount number into word
     Posted: 04 Sep 2012 at 4:07pm
Hi,

Can anyone, please help me how to convert amount in number to words.

I using this [UpperCase (ToWords ({@dispAmt}))]
but the amount display are like this :
AMOUNT : THREE HUNDRED TEN THOUSAND NINE HUNDRED FORTY AND 85 / 100 ONLY

The correct amount in words i needed is
AMOUNT : THREE HUNDRED TEN THOUSAND NINE HUNDRED FORTY AND EIGHTY FIVE CENTS ONLY

Can someone help me how to solve this.

Thanks
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 05 Sep 2012 at 4:06am
You need to split the number on the decimal point.  So, you could try something like this:
 
StringVar[] nums := Split({@dispAmt}, ".");
UpperCase(ToWords(nums[1])) + "AND " + nums[2] + " / 100 ONLY"
 
-Dell
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum