TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to convert Amount in Words using Crystal Report?
Pintoo Yadav
Apr 29
2015
Code
15.6
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
How to Convert Amount (Currency) in words directly on Crystal Report. Just Simply copy paste below code in your function. To Create function follow the steps given below: i) go to Field Explorer ii) right click on Formula Fields click on New give specific name iii) Formula Editor window will open just paste the Code given below iv) Save & Close... v) Just drag the Field to your specific required Location that done.
numbervar RmVal: = 0;
currencyVar Amt: = 0;
numbervar pAmt: = 0;
stringvar InWords: =
"Rupees "
;
Amt: = ({
vwCostTypes.UnitCost
});
if
Amt > 10000000 then RmVal: = truncate(ToNumber(Amt) / 10000000);
if
Amt = 10000000 then RmVal: = 1;
if
RmVal = 1 then InWords: = InWords +
" "
+ towords(RmVal, 0) +
" crore"
else
if
RmVal > 1 then InWords: = InWords +
" "
+ towords(RmVal, 0) +
" crores"
;
Amt: = Amt - Rmval * 10000000;
if
Amt > 100000 then RmVal: = truncate(ToNumber(Amt) / 100000);
if
Amt = 100000 then RmVal: = 1;
if
RmVal >= 1 then InWords: = InWords +
" "
+ towords(RmVal, 0) +
" lakhs"
;
Amt: = Amt - Rmval * 100000;
if
Amt > 0 then InWords: = InWords +
" "
+ towords(truncate(Amt), 0);
pAmt: = (ToNumber(Amt) - truncate(ToNumber(Amt))) * 100;
if
pAmt > 0 then InWords: = InWords +
" and "
+ towords(pAmt, 0) +
" paisa only"
else
InWords: = InWords +
" only"
;
UPPERCASE(InWords)
Crystal Reports in C#
Convert amount in words