Presenting HTML from Datasource in Report

2 posts, 0 answers
  1. Ben
    Ben avatar
    7 posts
    Member since:
    Feb 2015

    Posted 23 Apr 2015 Link to this post

    I have a stored procedure that return a recordset of html rows, such as the following: 

    row1: <tr class='cr38ReportHeader'><th>WBS</th>
    row2: <th align='center' colspan='1'>ABC<br/>XYZ<br/>07/01/12 - 12/31/12<br/>183</th>
    row3: <th align='center' colspan='1'>ABC<br/>XYZ<br/>07/01/12 - 12/31/12<br/>183</th>
    row4: <th align='center' colspan='1'>ABC<br/>XYZ<br/>07/01/12 - 12/31/12<br/>183</th>

    So each row in the recordset holds some HTML. I'm wonder what is the best was to present this in a Telerik report. 

    I've currently tried to concatenate all rows into a string set the value of an htmltextbox to concatenated string. This did not work. 

    Any ideas?


  2. Stef
    Stef avatar
    3610 posts

    Posted 27 Apr 2015 Link to this post

    Hi Robert,

    The HtmlTextBox works only with the HTML tags and CSS attributes listed here (only specififc text-formatting options). Any not listed tags (like TABLE) and attributes will not be rendered in the report.
    Thus my suggestion is to strip the unsupported tags and display the rest content in an HtmlTextbox or TextBox item.

    If you need to render HTML in different formats, please consider using Teler UI for AJAX - RadPdfProcessing, RadWordsProcessing. You may be interested also in Telerik UI for ASP.NET AJAX RadClientExportManager, which allows you to render pages in PDF and image formats.

    I hope the provided information helps you.


    See What's Next in App Development. Register for TelerikNEXT.

Back to Top