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

Export to RTF with HTML in the body

3 Answers 149 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shane Clay
Top achievements
Rank 1
Shane Clay asked on 10 Aug 2011, 06:58 AM
Hi Guys

We are using the reporting module to produce a printable document out of our database system. Some of the input fields that form the record we are reporting on use the RadEditor to allow our users to be more descriptive with their input.

The problem we are seeing at the moment is, when we export the report to RTF, the actual html which is input in the report is being shown in the exported document.

Everything works OK when viewing in the report viewer.

Any thoughts?

Shane

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 10 Aug 2011, 04:07 PM
Hello Shane Clay,

Due to RTF format limitations, the following CSS style properties set on the HTML tags are not respected:

  • borders
  • padding
  • background-color on Block elements is rendered as background-color of the text
  • text-align (center tag)
For more information regarding the RTF rendering check out Design Considerations for RTF Rendering help article.
All the best,
Peter
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Shane Clay
Top achievements
Rank 1
answered on 10 Aug 2011, 04:51 PM
Hi There

I'm not sure if I've explained myself well enough. What is being produced in the RTF is this:

Activity

 

 

 

<p><b><span style="font-family: arial; font-size: 11pt;">Case Management Meeting: 26/07/11</span></b></p>
<p>&nbsp;</p>
<p><b><span style="font-family: arial;">Phone Calls</span></b><span style="font-family: arial;">: x2</span></p>
<p><b><span style="font-family: arial;">Attempted PC</span></b><span style="font-family: arial;">: x0</span></p>
<p><b><span style="font-family: arial;">Text Message</span></b><span style="font-family: arial;">: x 0</span></p>
<p><b><span style="font-family: arial;">External Meeting</span></b><span style="font-family: arial;">: x1</span></p>
<p><b><span style="font-family: arial;">Letter Sent:</span></b><span style="font-family: arial;"> x 0</span></p>
<p><b><span style="font-family: arial;">Contact Regarding:</span></b><span style="font-family: arial;"> x8</span></p>
<p><b><span style="font-family: arial;">Home Visit:</span></b><span style="font-family: arial;"> x5</span></p>


I understand there are some things that wont work, but surely the actual HTML should not be sent to the RTF...?
0
Peter
Telerik team
answered on 11 Aug 2011, 09:58 AM
Hi Shane Clay,

Do you use TextBox item for the HTML content? Generally the Textbox item doesn't handle any HTML. The HTML in case of the Web report viewer is handled by the browser (IE, Firefox, Chrome and etc.) itself. However when it comes to other file formats the document viewers don't have a need and don't handle any HTML encoded text. Thus the report engine has to interpreter HTML encoded text and this is done only when the HTML encode text is in a HTMLTextBox.

Let us know how it goes and if you experience further difficulties we will appreciate if you send us the report definition to review locally.

Kind regards,
Peter
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

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