How do you render Html table in Report?

4 posts, 0 answers
  1. Kamal
    Kamal avatar
    3 posts
    Member since:
    Dec 2016

    Posted 20 Sep 2018 Link to this post

    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

     

  2. Todor
    Admin
    Todor avatar
    490 posts

    Posted 25 Sep 2018 Link to this post

    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
  3. Rakesh Kabra
    Rakesh Kabra avatar
    1 posts
    Member since:
    Apr 2019

    Posted 06 Feb in reply to Todor Link to this post

    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

     

  4. Todor
    Admin
    Todor avatar
    490 posts

    Posted 11 Feb Link to this post

    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
Back to Top