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!

Removing space in numeric field

Status
Not open for further replies.

kutoose

Technical User
Sep 11, 2002
169
US
I am having a numeric field. This field I am showing in the report. There is a space in the field before the first number. I need to remove that space and display in the report.
I was trying to use a formula for that using Ltrim(). The issue is that while Ltrim() I get an error " A string is required here". So I use the totext function before the Ltrim
Ltrim(totext(table.field)). When I display in the report I get in the format 1,2345.00 . I need the field to be displayed like 12345. Please help
 
Never heard of a numeric that could have a space in it.

Anyway, use Ltrim(totext({table.field},0,""))

-k
 
SV - the space is there for the sign...which isn't used if it is positive

Jim Broadbent
 
Ahhh, I see what you mean, the space when a numeric field is placed within Crystal, I thought that they meant in the database.

If the number is never negative, right click the field, select format field->Number->Customize->and change negatives to none, the space will disappear.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top