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

How do you render Html table in Report?

3 Answers 1201 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kamal
Top achievements
Rank 1
Kamal asked on 21 Sep 2018, 04:28 AM

I have html table stored on my database.

<table>

<tr>

<td>Name</td>

<td>Address</td>

</tr>

<tr>

<td>John</td>

<td>Tokyo</td>

</tr>

</table>

I created a sqlDataSource on Kendo Reporting and selected the htmlTextBox in order to render the my html code. However only the td element values are populated in a straight line like below

Name Address John Tokyo

I want this to be rendered in table format

Regards,
Kamal

 

3 Answers, 1 is accepted

Sort by
1
Todor
Telerik team
answered on 25 Sep 2018, 01:34 PM
Hello Kamal,

In order to render a Table you need to use the native Reporting Table/Crosstab/List item. I'm afraid the HtmlTextBox does not support the Table tag.
An alternative is to use custom approach like rendering HTML as an Image with third-party tool and using the image via PictureBox item.

Another workaround would be to use an ObjectDataSource, which data providing class gets the Table defined with the Html code, and based on its structure (i.e. 'tr'/'td' tags withing the Table) creates a properly structured supported object type. The returned object can be used to Create a Dynamic Table/Crosstab/List item.

I hope the provided information would help.
Let us know if you have further questions.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
n/a
Top achievements
Rank 1
answered on 06 Feb 2020, 11:38 AM

Hi Todor,

Do you have an example for the workaround using ObjectDataSource ?

Please let me know if Telerik has a roadmap for fully functional HTML there are many other products such as crystal provide the similar kind of option.

Thanks

 

0
Todor
Telerik team
answered on 11 Feb 2020, 09:43 AM

Hello Rakesh,

I have attached a sample with ObjectDataSource. You need to build the Visual Studio project and register the ClassLibrary1 dll in the Standalone Designer config file as explained in the Extending Report Designer article. When running the report you need to provide the correct file that describes the Html Table. I have included also a sample text file with table data - 'HtmlTable.txt'. The sample parsing code assumes that each tag is on a new line and the Html is valid. The console application is for text purposes.

Our plans for the year 2020 do not include fully functional HtmlTextBox.

Regards,
Todor
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Kamal
Top achievements
Rank 1
Answers by
Todor
Telerik team
n/a
Top achievements
Rank 1
Share this question
or