Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting dot(.) to comma(,) in a Crytal report

Status
Not open for further replies.

Phyl1

Technical User
Dec 17, 2003
1
NL
HI all,

How can i replace "." to "," ?????

Problem:
input of 10.0000 gives in the formula below 100000 as result. but this should be 10.
I replaced the "." into "," in the orginal file and that gave the desired answer of 10.
10,0000 should be 100000.

We don't want to replace the orginal files. what can i do?
FYI: I'm using crystal report just for 2 days.

NumberVar nLen;
StringVar sNum;
sNum := ToText({INVITEM_CSV.QUANTITY},4,",",".");
nLen := Length(sNum);
If Right( sNum, 1) = "0" Then
nLen := nLen -1;
If Right( sNum, 2) = "00" Then
nLen := nLen -1;
If Right( sNum, 3) = "000" Then
nLen := nLen -1;
If Right( sNum, 4) = "0000" Then
nLen := nLen -2;
Left(sNum,nLen);

We use a csv-file as input.

Thnx in advance.
Phyl1
 
commonly i m using this method like your situation.right click at report field then select format editor. at tab order select number. u can select what format u want it.

but for case csv-file i dont have any idea.

good luck
 
Are you trying to display currency in a European way such as 1.000,00 instead of 1,000.00?

If so this is a format option, just change the thouands separator and decimal point.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Try creating a formula like :

ToText({INVITEM_CSV.QUANTITY},0,"")

Let me knwo how you get on....

Reebo
UK

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
- Albert Einstein (1879-1955)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top