This is a migrated thread and some comments may be shown as answers.

HTMLTextbox in Excel Export

3 Answers 187 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 24 Oct 2012, 08:09 PM
I use an HTMLTextbox in my report to add line breaks in a field with <br />. When exports to Excel, the line breaks disappear. 

I know there is something in the Design Considerations for Report Rendering that says formatting is removed from the Excel export. Is there something I can do to get the line breaks in the cell, or is this something that will be fixed in a future version?

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 25 Oct 2012, 01:33 PM
Hello Jeremy,

If your main goal is to insert line breaks our suggestion is to use TextBox item and within the Expression editor to insert line breaks with Enter key.

Kind regards,
Peter
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Jeremy
Top achievements
Rank 1
answered on 25 Oct 2012, 04:49 PM
The data where the line breaks are stored are in the database and pulled into the field. Is there some code that I can have in the database field to have the line breaks?
0
Peter
Telerik team
answered on 26 Oct 2012, 11:50 AM
Hi Jeremy,

Our suggestion is to utilize the following user function to replace the <br/> tags with \r\n:

public static string CarriageReturn(string p)
{
    return p.Replace("<br>","\r\n");
}

Kind regards,
Peter
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Peter
Telerik team
Jeremy
Top achievements
Rank 1
Share this question
or