Text Editor Data in Report

4 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 06 Dec 2007 Link to this post

    Hi,
        I am using telerik report to print varchar(max) data type. In my application I have used telerik Text Editor. Data written in telerikText Editor is stored as varchar(Max) datatype.
         While viewing the report the text is getting adjusted according to the html tag in data.
    eg. If the data stored by text editor is  <b>Title</b> ,in view I can see the  Title as bold
        However while taking the print out the print is not showing the formatted text.
    Infact the html tags are printed. eg In above case <b>Tilte</b> is printed.
        I want only the text title to be printed bold without html tags.
       Can you please tell me how to print Varchar(Max) datatype in Telerik Report?
    Thanks,
    Rahul
  2. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 06 Dec 2007 Link to this post

    Hello Rahul,

    For the time being we do not support HTML text in the TextBox item. The Web ReportViewer renders the text as expected since the browser actually do render the text (HTML). When printing or export a report in PDF/Image we use GDI and PDF which do not process the text as HTML but render it as a plain text.

    This is a limitation that I believe we will soon overcome. As a workaround I can suggest you to strip the HTML tags thus leaving the plain text only. We have a function that you can use with any expression:

    =StripHtmlTags(Fields.HtmlTextField)

    I hope this information helps.

    Regards,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 06 Dec 2007 Link to this post

    Hi,
        The function =StripHtmlTags(Fields.Html.TextField)  does not removes  '&nbsp;'  for the  blank space.  Thus,  for blank space it is showing &nbsp;
     The function did not solved my problem. Is there any other way to solve the problem?
      When will be this limitation solved? In comming version (mid-December)?
    This is the major issue in my project.
    Thanks,
    Rahul
  5. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 07 Dec 2007 Link to this post

    Hello Rahul,

    Actually the StripHtmlTags() function only removes the HTML tags (ex. <A>text</A>) leaving the text in between. To decode the HTML encoded special characters you need to write your own function and use it like this:

        =DecodeHtml(StripHtmlTags(Fields.HtmlTextField))

    where DecodeHtml is your user defined function. For more information on user function please refer to this help topic.

    Greetings,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top