I am generating report in word(i.e) I am exporting all the data from the database and replacing it in with the placeholder in the word document.
While the data is being retrieved from the database if the data contains any enter or new line character it retrieves it with the boxes and hence it replaces the string in the word with boxes such as for eg. abc and then box icon and then xyz on other line
for
abc
xyz
text.how can i eliminate the box icon and still display the data as above?
I have tried replacing the character using chr(11), chr(13), system.newline etc but the box icon still exists? Is there any other way i can perform the above task?
vpatelintrac...
0 Points
1 Post
Word Report Carriage return issue using asp.net
May 26, 2011 11:52 AM|LINK
I am generating report in word(i.e) I am exporting all the data from the database and replacing it in with the placeholder in the word document.
While the data is being retrieved from the database if the data contains any enter or new line character it retrieves it with the boxes and hence it replaces the string in the word with boxes such as for eg. abc and then box icon and then xyz on other line for
abc
xyz
text.how can i eliminate the box icon and still display the data as above?
I have tried replacing the character using chr(11), chr(13), system.newline etc but the box icon still exists? Is there any other way i can perform the above task?
Andrew Morto...
Member
360 Points
60 Posts
Re: Word Report Carriage return issue using asp.net
May 28, 2011 11:32 AM|LINK
You can remove all the chr(13) and chr(11) using a regular expression replacement:
- t now contains "abcdef" with no extra characters.
(You'll need Imports System.Text.RegularExpressions)
HTH,
Andrew