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

replacing carriage returns in a string

Status
Not open for further replies.

MadCatmk2

Programmer
Oct 3, 2003
145
GB
Hi all

Details:
Crystal Ver. 9.0
Access Database

I have a field in one of my data base tables that is populated by one or more 3 character strings. These strings are seperated by carriage returns as far as i can make out. I'm trying to create an array within my crystal report to hold each of the 3 char strings individually.

At present i am trying to just get the strings in a formula without any spaces or carriage returns.

This is the code i have so far:

Code:
stringvar temp;

temp := Replace({CONTACTS.INTERVENTIONS}, chr(13),"");

temp

all i am needing to do is get rid of the carriage returns which i thought would just be a case of using the replace function with chr(13) as the carriage return.
When i do this however the value of temp still contains the returns.

I cannot see anything obviously wrong with the code. Hopefully someone will be able to point me in the right direction as to what i'm doing wrong.

Thanks in advance
 
Apologies

i have the problem sorted, i had to replace a chr(10) as well as the chr(13). Sorry for any inconvenience

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top