Free Support Forum - aspose.com

Using Aspose Words for SSRS to Render Complicated Html in an SSRS Report

This will be a yes/no question but I have to give some background so please bear with me:

The Challenge: We have a large TFS database from which we run many SSRS reports. The data in the TFS database consists of WorkItems with RichText fields. The RichText fields contain extremely complicated Html data including:

  • Tables that were created in MS Word - with varying cell sizes and colors
  • Images in any common format .bmp, .png, .jpg, etc...
  • Text of varying sizes, in any font, that might have color, bold, underline, etc. attributes

We would like to see SSRS render the content of the RichText fields in reports just as it appears in TFS.

- I have attached a sample of the content of a RichText field in our TFS database. If you view the file in notepad you will see the data that is stored in the TFS database. During report execution the data in the file is handed to an RDL TextBox. If you rename the file to .html and view it in a browser you will see what we would like to see in a report.

The Question: Can Aspose Words for Reporting Services render the complicated Html in a report? And can Aspose recognize tables and lists and render them correctly when the report is exported as .doc or .docx?

Hi,


Thanks for your inquiry. To turn the HTML formatting mode on, you should add the following lines to your rsreportserver.config file.

True

Please read following documentation link for your kind reference.
http://www.aspose.com/docs/display/wordsreportingservices/HTML+Formatting

We will test Aspose.Words for Reporting Services with shared HTML and will share our finding with you asap.

I have enablehtmlformatting set to true for both .doc and .docx formats… Doesn’t help at all…

Hi,


Thanks for sharing the information. Please use the latest version of Aspose.Words for Reporting Services 3.7.0. I have tested the scenario with latest version of Aspose.Words for Reporting Services and have not found any issue with EnableHTMLFormatting.

You can achieve your requirement by creating Placeholder in TextBox and set the Markup type as HTML-interpret HTML tags as styles. If the expression value of the placeholder contains valid HTML tags, these tags will be rendered as HTML. Please read following link for importing HTML into a Report (Report Builder and SSRS).

Supported HTML Tags and Limitations of Cascading Style Sheet Attributes

I have attached a sample RDL file along with Doc output file for your kind reference. Please let us know if you have any more queries.