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

Displaying Formatted Text In Report

1 Answer 745 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 19 Aug 2015, 09:05 PM

Hi,

Is it possible to display pre-formatted text within a report?
What I am trying to do is to allow a user to edit a document through a RadRichTextBox then save the document to database using a HtmlFormatProvider to obtain properly formatted HTML.  However, when I try to display the contents of the field within an HtmlTextBox, either nothing displays or all of the formatting is lost.

What I would really like to do, is to allow the user to import their source file directly into the RadRichTextBox and save that data to database and display within a report to preserve the formatting 100%.

 

Thanks,
Ryan

1 Answer, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 21 Aug 2015, 11:06 AM
Hello Ryan,

Please check my colleague's post in the Display the content of rich textbox in Report forum thread.

In general, the accepted HTML is only for general Text Formatting where reporting items provide additional data visualization options like text alignment and others in the items' Style objects. The entered HTML is not directly rendered in the document, we process the document and then we use the selected media possibilities to render the document.
You will need to remove the not supported tags and attributes before sending the content to an HtmlTextBox item. If you are using the RichTextBox, try the recommended settings for exporting the content - Import/Export Settings.

If the HtmlTextBox.Style options and supported HTML and CSS are not enough to format the content, test the suggested libraries or to load the HTML in a WebBrowser control and save it as an image that can be displayed via Picturebox item.


Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ryan
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or