Rich Text in Report

6 posts, 0 answers
  1. Wayne
    Wayne avatar
    17 posts
    Member since:
    Jan 2011

    Posted 30 Dec 2011 Link to this post

    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

  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 03 Jan 2012 Link to this post

    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!

  3. DevCraft banner
  4. Stargazer
    Stargazer avatar
    73 posts
    Member since:
    Jan 2007

    Posted 05 Jan 2012 Link to this post

    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!
  5. Svett
    Admin
    Svett avatar
    728 posts

    Posted 09 Jan 2012 Link to this post

    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!

  6. Stargazer
    Stargazer avatar
    73 posts
    Member since:
    Jan 2007

    Posted 09 Jan 2012 Link to this post

    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...
  7. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 12 Jan 2012 Link to this post

    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!

Back to Top
DevCraft banner