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
7 Answers, 1 is accepted
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,
the Telerik team
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!
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,
the Telerik team
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...
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.
the Telerik team
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.