SQL Reporting Services HTML Style Tags

reporting-servicessqlsql server

I'm using SQL Server Reporting Services 2008.

Per Microsoft, the following are the only tags that are supported.

Hyperlinks: <A href>
Fonts: <FONT>
Header, style and block elements: <H{n}>, <DIV>, <SPAN>,<P>, <DIV>, <LI>, <HN>
Text format: <B>, <I>, <U>, <S>
List handling: <OL>, <UL>, <LI>

My problem is that when rendering reports, style attributes are ignored. Most importantly for my problem, background color style is ignored. (I'd love support for other style tags, but this is really the big for me). I opened a support case with Microsoft, and they confirmed that this doesn't function in SQL Server 2012 either.

I've been reading about Custom Report Items – and it seems like SOMEONE must have handled this problem already, but I have now spent more time than I care to admit looking for solutions to this problem. Are there commercially available solutions to this problem? I can re-write reports using an additional reporting technology (Telerik more than likely), but I hate to spend the time and energy to do that when I've got a 98% workable solution already built using SSRS.

Just so everyone knows exactly what I'm talking about, when entering data into my database, I'm entering this data:

(I'm a new member, so I can't embed images – so I had to include as links:)

The Data I'm Entering : http://i.stack.imgur.com/xB5R4.jpg

The way SSRS displays image http://i.stack.imgur.com/UKM50.jpg

Finally, this is the way the information is being stored in the database:

<div><font style="BACKGROUND-COLOR:#FFFF00">highlighted yellow</font></div>

<div>&nbsp;</div>

<div><font color="#5C83B4">Blue Text, no highlight</font></div>

<div><font color="#5C83B4">&nbsp;</font></div>

Does anyone have any suggestions? I can't be the first person to whom this has been a big deal for SSRS, but it seems like most people have been able to make do without this. Unfortunately, we're moving from automation of MS-Word to SSRS, so losing that important piece of functionality would be seen like a giant step back to our users.

Best Answer

Your question borders on asking for recommended libraries and opinions. Nonetheless, let me summarize the options and the way I see them:

  • Don't chop your text into divs, but use other SSRS toolbox items such as tablix cells and textboxes, and give those a background color.
  • Create your own component. Certainly possible, but quite a pain to get it working IMHO.
  • Choose a third party component. Stack Overflow isn't very good at (nor meant for) recommendations, but a quick search would render at least one result.
  • Switch to another reporting tool.
  • Drop the requirement. (Okay, you stated that's not possible for you, but others landing here may want to consider that option.)

Don't skip the final two options too quickly ;-)