Hi,
I am facing an issue when the html data show in the telerik report.
I am using Reporting Q3 2011 .
I have placed HTMLTextBox control in the report page.
After I taken html page and read its content to the string and assigned this string to the
HTMLTextbox obect value.when running report error occurs.
The reason of this error is 'the html' page contains tables.
I am attaching my htmlpage along with this email.
How can generate the report of this html page?
This is an urgent requirement.
Thanks
Sindu.
3 Answers, 1 is accepted
You can only attach images in forum threads and that is why we have not received any attachment. About your inquiry, as duly noted in the HtmlTextBox help article, the HtmlTextBox works with text formatting options only.
The supported HTML tags and css attributes are listed in the referenced article and table is not among the supported tags.
Kind regards,
Steve
the Telerik team
Hi Steve,
I have attaached my html page image along with this email.this html file is saved in my "C" drive.
which control in telerik reporting should be I used for this html diplay.I couldn't attach
html file directly .so I attached image of the sam file .
I am telerik licensed user.
Thanks,
Sindu
We want to stress that Telerik Reporting is a reporting engine and not a printing library, so rendering HTML produced by 3rd party or even our own editors is not among our goals.
We would state the obvious: Telerik Reporting is not able and does not have to render all HTML tags and CSS attributes. Support for all HTML tags and css attributes would mean that we will need to develop an HTML engine which will be responsible for rendering this HTML before it hits the client. In other words, we will need to develop a fully functional browser. You see that this task goes completely out of the scope of a reporting product, moreover it is not trivial at all and quite frankly we (the reporting team) do not have the resources and intention to go this way. In fact even Microsoft does not do this in their SQL Reporting Services product.
The existence of the HtmlTextBox is solely based on the need to render a small subset of HTML tags and CSS attributes to support the most common text formatting options:
- Supported HTML tags:
* Font, size (relative size against the font size of the item, default is 3 (1-7)), color (<FONT>)
* Bold, Italic, Underline (<STRONG>,<B>, <EM>, <I>, <U>)
* HyperLink (<A href target>)
* Lists (<OL>, <UL>, <LI>)
* Organize the text in paragraphs (<DIV>, <SPAN>,<P>, <BR>, <CENTER>)
- Supported css attributes:
* background-color
* border-color, border-width, border-style
* text-align (center, left and right only), text-indent
* font-family, font-size, font-weight
* padding, padding-bottom, padding-top, padding-right, padding-left
* color
The only possible approach to display unsupported content in Telerik Reporting we know of is utilizing the WebBrowser control to render HTML to a bitmap. We use an user defined function that does the trick, and a picture box item which displays the generated image (PNG). This approach has several shortcomings and is far from perfect, but it seems to work in most cases and in all export formats (which support PictureBox items). As it is a custom solution, please do not report any problems to us and use it as is. One thing to note is that you should set the HTML as value for the browser.DocumentText property, in the example we've used URL from the RadEditor examples to quickly illustrate the approach.
Kind regards,
Steve
the Telerik team