Print Page | Close Window

Converting Number into Words

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19136
Printed Date: 28 Apr 2024 at 12:47am


Topic: Converting Number into Words
Posted By: VaniShree
Subject: Converting Number into Words
Date Posted: 17 Feb 2013 at 11:26pm
Hello All,

I am trying to convert my value into words when am using TOWORDS(NUMBERS) my decimal values is not getting converted to words instead it is giving  output like this
To Words(123.4);

"one hundred twenty three  and 4 / 100"
but i want to display as 
one hundred twenty three  and four paisa

is there any i can do this ..
Dead


-------------
Vanishree



Replies:
Posted By: hilfy
Date Posted: 18 Feb 2013 at 6:37am

Instead of sending the whole number, I would do something like this:

 
NumberVar paisa = NUMBERS mod 100;
 
ToWords(Truncate(NUMBERS)) + " and " + ToWords(paisa) + " paisa"
 
This splits off the decimal portion of the number and converts it to words separately.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window