Table Report with raw HTML

1 Answer 19 Views
Table
Tim
Top achievements
Rank 1
Iron
Veteran
Iron
Tim asked on 21 Jul 2021, 10:59 PM

I have a table report with a percentage in one column. I'd like to add a column with a horizontal bar as a visual indicator of the percent value, something like this:

<progress max="100" value="70"> 70% </progress>

I've tried using HtmlEncode and HtmlDecode but it doesn't display correctly. Is there a way to use formatted raw HTML for the value of a column like this?

"<progress max='100' value='" + Fields.Percent + "'> " + Fields.Percent + " % </progress>"

Thanks

1 Answer, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 26 Jul 2021, 01:39 PM

Hi Tim,

At this time, it is not possible to render raw HTML in a Report without using the Report Rendering Engine. However, there is an existing feature request and potential alternative options. Let me review this below. 

Feature Request

We are considering an option for rendering any HTML Tag in a Report Viewer using either a WebBrowser control for the Desktop Report Viewers or native HTML processing in the Web Report Viewers. For details about this, see the Render any HTML Tag/CSS with WebBrowser Control feature request.

Potential Alternative Approaches

First, let me explain the reason for the the feature request. We do provide an HtmlTextBox component that can be used to render the Textual HTML Tags within a report. In the case of a progress control or any other Graphical HTML Tag, this would not be supported. It may be possible to try the below alternative approaches.

1. Render a Nested Single Item Bar Chart within a Table Item. This process is described in our How to Nest a Graph Item in a Table Item article.

2. Render an Image Representation of the Progress Bar in the Column. This would require having the images prepared prior to processing the report and using the PictureBox component.

Wrapping Up

Ultimately, the desired feature is not possible but may be in the future. There are alternatives that may be suitable depending on the exact scenario.

Please let me know if you need any additional information. Thank you.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tim
Top achievements
Rank 1
Iron
Veteran
Iron
commented on 27 Jul 2021, 10:34 AM

Thanks for your response.
Tags
Table
Asked by
Tim
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Share this question
or