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:
<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”
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?
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!
Great question. I looked into this and now have the result here: http://sqlblog.com/blogs/greg_low/archive/2008/12/19/rendering-html-in-reporting-services-text-boxes-in-sql-server-2008.aspx
Thank you MSFT!
Its good to see them incorporate this!
this HTML all over my reporting is driving me crazy!
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.
This worked great, thanks so much!
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?
thanks a lot for this tip. This saved a lot of time.
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?
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?
that was a nice tip,would have been better if we had that option in sql server 2005 as well.
Holy schmolly I was soo lucky to find this on page 1 of google.
Thanks; this helped.
This is what I needed!
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 "↑" . I created a text box and added the ↑ as the value. The problem is SSRS converts this into a string "&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.
This is genius! Thank you so much!
I am using this functionality but I also need an image within the html text to appear within the report but it just doesn't appear. The full path to the image is within the html. e.g. http://localhost/appname/images/test.jpg
Help appreciated! Thanks
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.
how to render <table> tag it is faulty.
See comment at the bottom
Thank you – I had been struggling with this for hours – wish I had stumbled upon this post first!
the html tag underline and background-color cannot work, is there any solution or workaround?
it worked for me thanks
Excellent. Thanx a lot !!!
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
It is very useful to me… Really great…. Thanx
Thank you It's Really help for me…
It is very useful to me… Really great…. Thanx a lot
You the man …… thanks a lot
Thanks buddy…… it resolved a blocker issue 🙂
Very helpful – thank you!
you resolved a head ache 🙂 awesome man 🙂
Could please let us know how to insert the <MArquee> tag in SSRS report using bids.
Sorry Swa, don't know that one.
Awesome! Thanks a lot!!
We seem to have an issue with only colons now, they are still displaying as :
Any ideas? Thanks again!
work!!! thank you
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.
Hi Sawan you will need to provide an example. Why do you have the quotes?
Thanks its working.
Thanks – simple quick solution. The best kind. I read a couple of convoluted suggestions before coming to your page.