Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: remove all chr(10) from a string Post Reply Post New Topic
Author Message
anditburns
Newbie
Newbie


Joined: 16 Nov 2011
Online Status: Offline
Posts: 2
Quote anditburns Replybullet Topic: remove all chr(10) from a string
    Posted: 22 Nov 2011 at 4:01pm

Hi all,

I am trying to right up some code for work and I am struggling.
 
Basially what I have is a field from a database called {PROBSUMMARYM2.BW_SERVICES_AFFECTED} this field is a memo field
Because this field is a memo field there is a strong chance that when i convert to string
ToText ({PROBSUMMARYM2.BW_SERVICES_AFFECTED})
there will be chr(10) (next line) characters present in the string.
 
what I would like to do is remove all occurances of the char(10) for each occurance.
 
to give you an example of a likely output we could have
Quantum
Swift
Eximbills
 
But I need make this Quantum/Swift/Eximbils.
 
Having said that there could be any number of different combinations of char(10) depending on what services are effected (could have up to 10+ new lines in the string or it could have none)
 
thanks for your time.


IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Nov 2011 at 5:01am
x:=replace(memofield, chrw(10), "/")
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.