• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1014
  • Last Modified:

how to change thousand seprator format in numeric value

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
navdeepsunny
Asked:
navdeepsunny
  • 3
  • 2
1 Solution
 
mlmccCommented:
Try this

Add a formula where you want the number displayed

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

mlmcc
0
 
navdeepsunnyAuthor Commented:
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
 
mlmccCommented:
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
 
navdeepsunnyAuthor Commented:
using towords() formaula from crystal reports to display amount in words.

Regards
Navdeep
0
 
mlmccCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now