Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: how to replace \r\n before exporting from crystal Post Reply Post New Topic
Author Message
jazzright
Newbie
Newbie


Joined: 01 Apr 2008
Location: Fiji
Online Status: Offline
Posts: 15
Quote jazzright Replybullet Topic: how to replace \r\n before exporting from crystal
    Posted: 08 Jul 2008 at 9:00pm
I am using crystal report Xl with vs2005 and i want to export to text file.
I can export but after 32 lines a box symbols shows. How can i remove that.
How can i remove \r\n before exporting to text file. please advice me.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 08 Jul 2008 at 9:39pm
You can't change anything on the report just for the export process. You could create a formula so that strips those characters out of your text, but I assume that you have many fields and this could be a lot of formulas that you need to build. Otherwise, I don't think its possible.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jazzright
Newbie
Newbie


Joined: 01 Apr 2008
Location: Fiji
Online Status: Offline
Posts: 15
Quote jazzright Replybullet Posted: 08 Jul 2008 at 9:42pm
thats what i want to do .
Can you please show me the code how to do this please......

Much appreciated.......
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 09 Jul 2008 at 1:07am

Hi,

You can use replace function , it will be

trim(replace({table.fieldname},'\r', ''))

same for \n 

Cheers

Rahul

 

 



Edited by rahulwalawalkar - 09 Jul 2008 at 1:07am
IP IP Logged
sashalewis1014
Newbie
Newbie
Avatar

Joined: 09 Jul 2008
Location: United States
Online Status: Offline
Posts: 5
Quote sashalewis1014 Replybullet Posted: 09 Jul 2008 at 12:47pm
I am using the same replace process but need to have two evaluations and replacements
 
trim(replace({table.fieldname},'\r', ''))
trim(replace({table.fieldname},'\s', &))
 
How do I combine two of the trim(replace into one formula????
Sasha Lewis
Database Development Manager
PKD Foundation
sashal@Pkdcure.org
IP IP Logged
jazzright
Newbie
Newbie


Joined: 01 Apr 2008
Location: Fiji
Online Status: Offline
Posts: 15
Quote jazzright Replybullet Posted: 10 Jul 2008 at 3:08pm
still iam getting the page break symbol....
IP IP Logged
sashalewis1014
Newbie
Newbie
Avatar

Joined: 09 Jul 2008
Location: United States
Online Status: Offline
Posts: 5
Quote sashalewis1014 Replybullet Posted: 10 Jul 2008 at 7:04pm
were you able to get rid of the /r but you still have the /n in the file? If so, I founda way to get around that. I do not it if it is the easiest but it worked.
 
I created the first formula "Address Line 1":
 
trim(replace({address1}, '/r/', ''))
 
I created a second formula "Adress Line 1 Trim"
 
trim(replace({@Address Line 1}, '/n', ''))
 
Put the second formula in the report and worked perfectly.
Sasha Lewis
Database Development Manager
PKD Foundation
sashal@Pkdcure.org
IP IP Logged
jazzright
Newbie
Newbie


Joined: 01 Apr 2008
Location: Fiji
Online Status: Offline
Posts: 15
Quote jazzright Replybullet Posted: 10 Jul 2008 at 8:37pm
hi,
r you exporting it to the text file.
I have tired but still not getting it....so i have to it in my code or is crystal report...

struggling with this issue ..................


Edited by jazzright - 10 Jul 2008 at 8:37pm
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 14 Jul 2008 at 2:07am

Hi,

Can you post some sample data ...

 

Cheers

Rahul

 

 

 

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.047 seconds.