THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

The Bit Bucket (Greg Low): IDisposable

Ramblings of Greg Low (SQL Server MVP, MCM and Microsoft RD) - SQL Down Under

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://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://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.

Published Monday, August 25, 2008 12:46 PM by Greg Low

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Shannon said:

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?

October 8, 2008 11:45 AM
 

MartinMiles said:

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!

December 15, 2008 7:45 AM
 

Greg Low said:

December 19, 2008 1:21 AM
 

Chad said:

Thank you MSFT!

Its good to see them incorporate this!

January 16, 2009 10:52 AM
 

meg lansing said:

THANK YOU!

this HTML all over my reporting is driving me crazy!

m

June 10, 2009 2:41 PM
 

AK said:

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.

July 29, 2009 8:40 AM
 

Peter Karhatsu said:

This worked great, thanks so much!

August 12, 2009 4:23 PM
 

Florian said:

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?

December 18, 2009 5:10 AM
 

vishal said:

thanks a lot for this tip. This saved a lot of time.

January 7, 2010 8:38 PM
 

Oliver said:

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?

January 27, 2010 9:30 AM
 

Namratha said:

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?

January 28, 2010 1:07 AM
 

Sriram said:

that was a nice tip,would have been better if we had that option in sql server 2005 as well.

February 24, 2010 4:56 AM
 

Marigold said:

Holy schmolly I was soo lucky to find this on page 1 of google.

April 10, 2010 10:59 PM
 

Mike said:

Thank you.

October 15, 2010 5:52 PM
 

Darrien said:

Thanks; this helped.

February 4, 2011 4:27 PM
 

Dmitry said:

This is what I needed!

Thank you!

March 1, 2011 5:46 PM
 

Chin said:

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.

March 2, 2011 7:26 PM
 

Leah said:

This is genius!  Thank you so much!  

June 10, 2011 11:58 AM
 

Philip Egan said:

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

June 27, 2011 6:29 AM
 

Humberto Moreno said:

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.

Cheers.

February 21, 2012 3:30 PM
 

Fortune said:

how to render <table> tag it is faulty.

April 3, 2012 8:35 AM
 

YaRu said:

See comment at the bottom

April 19, 2012 8:16 AM
 

Sue said:

Thank you - I had been struggling with this for hours - wish I had stumbled upon this post first!

August 16, 2012 11:04 AM
 

Paul9194637 said:

the html tag underline and background-color cannot work, is there any solution or workaround?

September 12, 2012 12:19 AM
 

thirumurugan said:

it worked for me thanks

December 19, 2012 1:35 AM
 

Dipendra Paudel said:

Excellent. Thanx a lot !!!

March 11, 2013 3:53 AM
 

Jiss said:

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

April 25, 2013 2:55 AM
 

Azarudhin said:

It is very useful to me... Really great.... Thanx

a lot

May 30, 2013 2:08 AM
 

Poonam said:

Thank you It's Really help for me...

July 3, 2013 3:32 AM
 

Ronaldo said:

It is very useful to me... Really great.... Thanx a lot

April 17, 2014 11:10 PM
 

Farrukh Malik said:

You the man ...... thanks a lot

April 28, 2014 5:16 AM
 

Manish Sharma said:

Thanks buddy...... it resolved a blocker issue :)

July 25, 2014 1:30 AM
 

Betsy said:

Very helpful - thank you!

December 16, 2014 12:36 PM
 

karpagam said:

you resolved a head ache :) awesome man :)

December 17, 2014 5:07 AM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

Tags

No tags have been created or used yet.
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement