Displaying HTML content in Reporting Services 2008

A friend of mine that works for Microsoft pinged me yesterday about how to strip HTML tags out of text he was trying to display in Reporting Services. He just wanted the text displayed. The typical text looked like this:

<div class=ExternalClassB9A517D3DE254676B8266F6B2D84FD05>
<p>SciTech Software is a software development and consulting company. The company was founded in 1991 with the intention of creating software for scientific instruments, but our focus has shifted towards creating tools for developers.
<p>We have worked in close collaboration  with <a href="http://
http://www.thermometric.com/">Thermometric AB</a> with some of our products, but now we concentrate on our own tool for the .NET Framework: <b><a href="http://http://memprofiler.com/">.NET Memory Profiler</a></b>.
<p>We have extensive experience developing using C++, Java and C#.  Currently, our main development environment is the .NET Framework. </p></div> 

I'd heard this could be done in Reporting Services 2008 so I tried it and it's easy. I presume others might find simple instructions helpful:

1. In the table where I want to display the column, right-click the cell and chose Create Placeholder….

2. On the General tab (of the new placeholder's properties), set the value to the required column.

3. In the Markup type, choose the option for HTML – Interpret HTML tags as styles

and you're done.

42 thoughts on “Displaying HTML content in Reporting Services 2008”

  1. what if you want to leave the markup in there.. and there are table tags in that markup.  is there anyway to get the table tags to render?

  2. Hey Grey.  I read with interest your post on the HTML data representation from SQL in SSRS 2008.  I have recently installed SSRS 2008 and don't see the option you mention. i.e. "Create Placeholder…"  I am using the "out of the box" SSRS 2008 install from M/S with Business Intelligence Development Studio as the report designer.  Could you let me know what I am missing?  I'm also interested in Shannon's question on getting the HTML to render as .. well .. HTML!

  3. We are using local reports and all reports have been already developed in it. Due to a requirement change we need to include a third party control for rich text and render the HTML content in reports. We are working on .Net framework 2.0.

  4. If I have some picture in my html publishing column, they do not appear in the report even if the "HTML – Interpret HTML tags as styles" is selected.
    Any idea what is wrong?

  5. This works if I choose to develop a report using the BI Template on Visual Studio 2008. But is there anything for developing a report using the Report Viewer control in a web application template?

  6. This works great for the text i display in my textbox.But,How can I remove HTML tags from the tooltip text i display for my textbox?

  7. I have an interesting situation. We are trying to display the uparrow inside of a textbox. The standard HTML code for an uparrow in html is "&uarr;" . I created a text box and added the &uarr; as the value. The problem is SSRS converts this into a string "&amp;uarr;" to display it as is. I don't want it to display this as is. Instead I want it to interpret as special html. I have already played around with the html interpret tag. It doesn't seem to help in this case. If you know a way around this please help me.

  8. You don't actually need a dataset and a Tablix.
    With just a Label and a PlaceHolder inside of it you can achieve the same results, without the need to hit a server nor pass a data set.

  9. Hey Greg, really helpfull. 'Interpret HTML tags as styles' is enough to decode the html tags in SSRS, but i think as you said 2008 R2 only supports it

  10. Awesome!  Thanks a lot!!
    We seem to have an issue with only colons now, they are still displaying as :
    Any ideas?  Thanks again!

  11. When I pass html text within double or single quote in XML parameter the text is correctly formated in report but come within  double or single quote.
    How we remove quotes.

  12. Thanks – simple quick solution. The best kind. I read a couple of convoluted suggestions before coming to your page.

Leave a Reply

Your email address will not be published. Required fields are marked *