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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem to show currency as string

Status
Not open for further replies.

umeshs79

Programmer
Aug 7, 2002
42
DE
Hi,
I need to show currency as string in my report for that i have wreitten a formula:
e.g.

ToText(currAmount, "###,###,###");

Now my problem is that if number of digit are less than 9 it insterts space between currency symbol and amount
it display as follows
Amount
-------
$123,456,678
$ 0

extra space is instered between 0 and $.

So please tell how i remove this space between currency symbol and amount.

Thanks
Umesh Sharma,MCSD
India
 
Your spaces are there because of the poundsign pattern in your formula. You could have done:

ToText({CurrAmount},0,',')

but if you need the pattern you have try:

'$' + ltrim(ToText({CurrAmount}, "###,###,###")); Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top