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

Remove the - character from field data from displaying on report

Status
Not open for further replies.

nemmeh

Technical User
Jul 7, 2003
30
US
I'm working with Crystal 8.5 and I have a particular field that is stored as a text in the database. The consistency of the data entered into the field varies for each of the databases we have, for instance.

Field: WebNumber
Values:
001-
002-
3-
393-
2993-
500

As you can see from the example above, sometimes the Dash - is included in the data and sometimes it isn't. When I display this field's data on the report I would like to eliminate this single character from displaying on the report.

Any Ideas? Trim, Subscript, etc. doesn't seem to give me what I'm looking to do.. I know there has to be an easy way to find a single character in a field and just display everything else in the field besides that one character.
 
Nevermind... I figured it out, thanks..

Left({Store Information Database.WebNumber}, (InStr({Store Information Database.WebNumber},'-') - 1))
 
Try this

Code:
replace({table.field},"-","")

-lw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top