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

How to replace spaces in data with underscores

Status
Not open for further replies.

cinbh

MIS
Apr 16, 2002
58
US
I have a offsite company that requires underscores rather than spaces in our output data. This would be with every field within my report. Right now my poor traffic clerk is physically doing this in the spreadsheet I export to, then sending to the offsite. Is there a quick formula or some setting that I can use. We are using Crystal 8.5 with VFP 8.0 on ODBC connect.
Thank you.
 
Replace({YourString}," ","_"} should do the trick

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
askdon@srhconsulting.com
 
Thanks for your quick response! Works great, but now my enduser just told me she also needs to take out puncuation too in addition to replacing the spaces with underscores. So since the customer name field may have commas, periods, apostrophes or quote marks is there away to reprocess those forumla field results.
Thanks, Cin
 
NEVERMIND, I just went ahead and kept doing nested replaces THANK YOU AGAIN! HAPPY HOLIDAYS
Cin
 
There is a free UFL on Ken Hamady's site that strips all punctuation from a string. I don't have the exact URL but check out and poke around and you will find it.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
askdon@srhconsulting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top