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

Rich Text in Report

7 Answers 544 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wayne
Top achievements
Rank 1
Wayne asked on 30 Dec 2011, 01:33 PM

Hi,

I’m using a RichTextBox in my application where I do some very simple text formatting; Bold, Text size, color, und Tab. This I then save to a database. I need to print this including the text formatted.

I’ve tried using the HTML DataProvider and HTMLTextBox and TxtFormatProvider with a TextBox in my report but the formatting does not work.

I have read that I can do this with a bitmap, but before I try this would you let me know if this is the only way, or is it possible to display richText in a report with the standard tools?

 

Thank you very much

Wayne

7 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 03 Jan 2012, 11:07 AM
Hi Wayne,

Unfortunately the HTML that HtmlFormatProvider exports is not fully compatible with the HTML that the HtmlTextBox report item recognizes. The list of supported tags in HtmlTextBox can be found here and the customization possibilities of the HtmlFormatProvider are described in this article. Maximum compatibility is achieved by setting the DocumentExportLevel to Fragment ad StylesExportMode to Inline, but there are other issues that cannot be worked around, namely the recognition of Bold and Underlined parts of the document. 
If you would be showing the exported document in a report, we can send you the source code of RadRichTextBox and HtmlFormatProvider, so that you can create a custom HTML format provider that will be compatible with HtmlTextBox. In that case, please open a support ticket requesting the source code.
We will try to make HtmlTextBox and RadRichTextBox compatible as soon as possible, but the time frame is still not certain. We've created a PITS issue, which you can track and vote for in order to increase its priority. Here you can find the PITS Issue: Public URL (ID: 7583).

All the best,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Stargazer
Top achievements
Rank 2
answered on 05 Jan 2012, 01:25 PM
Hello!

My question is on the same lines of Wayne's question, but with a twist. I have 2 applications both editing the same database field. One is web (ASP.NET) and the other is windows based (WinForms). In the web I use RadEditor to allow for formatting. In the winforms I'm currently using RadMarkupEditor.

It all works great most of the time, but the sometimes there is some inconsistencies between them. But even worse is when I need to print that information wit Reporting. 

My question is that if I change the editor on my windows application to the new  RichTextBox of the suite and change all the formatting to RichText (in the web application also) would that formatting be accurately rendered in the reports?

Assuming, off course, that the web RadEditor is RTF compatible with the windows editor.

If this can not be done, I'm in a pickle to go around this one, as I need to provide formatting capabilities to my users and also provide them the ability to print that information in reports...

Thanks for your time!
0
Svett
Telerik team
answered on 09 Jan 2012, 10:27 AM
Hello Stargazer,

RadRichTextBox for WinForms supports different export and import formats. In your case, you can export its content to RTF by using the RtfFormatProvider. You can read more about it in the online documentation.

All the best,
Svett
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Stargazer
Top achievements
Rank 2
answered on 09 Jan 2012, 10:40 AM
Hello Svet,

I think it's best for me to elaborate a bit more on my case. :)

I've already read the docs you advise me to and I understood them correctly. No doubts there. The problem is, however, a bit different.

I have report that has to have a specific layout. The formatted text is just a part of that document even if sometimes it can span for several pages. I have a screenshot of such an example attached, where in the yellowed area is where the formatted text goes. This report is a class log, which represents class activities along the school year. The application should allow them to format the input text and then be able to print that same formatted text.

Right now I'm having the issues already discussed and I'm trying to see if I can managed this without having to resort some custom solution instead of the Telerik Reporting.

So, it's easy to see, reporting comes pretty handy here. If I cannot use reporting for this, I'll have a considerable amount of work this one out...
0
Steve
Telerik team
answered on 12 Jan 2012, 10:40 AM
Hello,

Thanks for elaborating. Unfortunately the situation is the same as described in our first post, namely the RadRichTextBox for WinForms uses the same code base as the RichTextBox for Silverlight.

Greetings,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Xiao
Top achievements
Rank 1
answered on 17 Oct 2018, 06:50 PM
Canthereport engine displayRTF data now?
0
Ivan Hristov
Telerik team
answered on 22 Oct 2018, 10:39 AM
Hello Xiao,

No, importing content from a RTF source is not supported in Telerik Reporting. However, you can load the plain text content and use the report designers styling options to apply the necessary decorations and render it back to RTF format.

Regards,
Ivan Hristov
Progress 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
Wayne
Top achievements
Rank 1
Answers by
Steve
Telerik team
Stargazer
Top achievements
Rank 2
Svett
Telerik team
Xiao
Top achievements
Rank 1
Ivan Hristov
Telerik team
Share this question
or