Print Page | Close Window

how to replace \r\n before exporting from crystal

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3640
Printed Date: 01 May 2024 at 5:12pm


Topic: how to replace \r\n before exporting from crystal
Posted By: jazzright
Subject: how to replace \r\n before exporting from crystal
Date 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.



Replies:
Posted By: BrianBischof
Date 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>


Posted By: jazzright
Date 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.......


Posted By: rahulwalawalkar
Date 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

 

 



Posted By: sashalewis1014
Date 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


Posted By: jazzright
Date Posted: 10 Jul 2008 at 3:08pm
still iam getting the page break symbol....


Posted By: sashalewis1014
Date 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( mailto:%7b@Address - {@Address Line 1}, '/n', ''))
 
Put the second formula in the report and worked perfectly.


-------------
Sasha Lewis
Database Development Manager
PKD Foundation
sashal@Pkdcure.org


Posted By: jazzright
Date 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 ..................


Posted By: rahulwalawalkar
Date Posted: 14 Jul 2008 at 2:07am

Hi,

Can you post some sample data ...

 

Cheers

Rahul

 

 

 




Print Page | Close Window