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

Remove thousand separator when using totext 1

Status
Not open for further replies.

munchen

Technical User
Aug 24, 2004
306
0
0
GB
I am using crystal v 8.5 and I am connecting via ODBC to a microsoft access db.

I have a field called clientid(number) and it is displayed like the following 12,222.00. I now have a parameter field that prompts the user to enter a client id or leave it as the default of 0 to see all the clients. I have set up a formula field in the report that I want to display either 'ALL' if they leave the parameter as the default or the clientid that they enter(and to exclude the thousand separator and the two decimal places). My code below works except it is still showing the thousands separator.

EG - 12,222

if {?ClientID} = 0 then
'ALL'
else
totext({?ClientID} ,0)
 
You need to use the third optional argument for ToText which represents the thousands separator:

ToText({?ClientID}, 0, [red]''[/red])

-dave
 
vidru

exactly what i needed. many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top