Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: remove all chr(10) from all strings 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 all strings
    Posted: 22 Nov 2011 at 3:49pm

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.


Edited by anditburns - 22 Nov 2011 at 3:56pm
IP IP Logged
asam
Newbie
Newbie
Avatar

Joined: 08 Jan 2011
Online Status: Offline
Posts: 20
Quote asam Replybullet Posted: 26 Dec 2011 at 10:41am
formula = replace(
     replace(  {PROBSUMMARYM2.BW_SERVICES_AFFECTED}} ,chr(13),"/"),
    chr(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.031 seconds.