Solved

how to change thousand seprator format in numeric value

Posted on 2006-11-01
7
952 Views
Last Modified: 2008-01-09
HI,
i am using crystal reports in vb 2006.

i am facing problem from long time to display numeric value with thousand seprator.

in crystal report numeric value shown as   116,791.00

but i want to display as indian format like  1,16,791.00

without changing client side system setting.

please help me to solve this problem.

Regards
Navdeep
0
Comment
Question by:navdeepsunny
  • 3
  • 2
7 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 17855944
Try this

Add a formula where you want the number displayed

Name - DispNumber
Formula
ToText({YourNumberField},"#,##,###.##")

mlmcc
0
 

Author Comment

by:navdeepsunny
ID: 17857422
thanks lot

one more problem regarding this

in crystal report numeric value shown as   116,791.00

but  with help of formula ToText({YourNumberField},"#,##,###.##")

value shown as   1,16,791.00

but when i display in word it display "one hundred sixteen thosand seven hundred ninty one"

but i want to display " one lakh sixteen thousand hundred ninty one"


please help me to solve this problem.

Regards
Navdeep
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17858985
To do that you will probably have to write your own translation function.

What formula or function are you using to convert the number to words?

mlmcc
0
 

Author Comment

by:navdeepsunny
ID: 17864206
using towords() formaula from crystal reports to display amount in words.

Regards
Navdeep
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17864414
I don't know if towords can handle Indian currency.

Here is the beginning of a formula

Name - ToWordsIndian
Formula
WhilePrintingRecords;
StringVar strAmount := "";
NumberVar ValLakh := 0;
NumberVar ValRest := 0;
NumberVar intComma := 0;

strAmount := ToText({YourNumberFIeld}, "#,#####");
intComma := instr(StrAmount,",");
ValLakh := val(left(StrAmount,intComma - 1));
ValRest := val(mid(StrAmount,intComma + 1));
towords (ValLakh,0) & " lakh " & Towords(ValRest,0)

mlmcc
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now