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

Text Editor Data in Report

3 Answers 206 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 06 Dec 2007, 12:11 PM
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

3 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 06 Dec 2007, 03:41 PM
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
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 07 Dec 2007, 05:34 AM
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
0
Svetoslav
Telerik team
answered on 07 Dec 2007, 03:07 PM
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
Tags
General Discussions
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Rahul Khinvasara
Top achievements
Rank 1
Share this question
or