Currency to text Conversion
Converts the Currency to Text. For Ex: 100.90 is converted as one hundred dollars and ninety cents only.
Assumes
Insert a formula field in crystal reports and Paste the Code and replace the
currencyfield in the code with any reportfield whose datatype is currency or
Integer.
Returns
String
Rate Currency to text Conversion
(15(15 Vote))
if right(totext({currencyfield}),2) = '00' then
uppercase(left(towords(truncate({currencyfield}),0)+' ' +'dollars'+' '+ 'only',1)) + right(towords(truncate({currencyfield}),0)+' ' +'dollars' + ' ' + 'only',length(towords(truncate({currencyfield}),0)+' ' + 'dollars' +' '+ 'only') -1)
else
towords(truncate({currencyfield}),0) +' '+'dollars'+' '+ 'and'+' ' +towords(tonumber(right(TOTEXT({currencyfield}),2)),0)+' '+'cents'+ ' ' + 'only'
Currency to text Conversion Comments
No comments yet — be the first to post one!
Post a Comment