SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Creating a heat map in Reporting Services


Creating a heat map in Reporting Services

Author
Message
AndyOwl
AndyOwl
SSC Veteran
SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)

Group: General Forum Members
Points: 240 Visits: 182
Comments posted to this topic are about the item Creating a heat map in Reporting Services

Andy is a director of Wise Owl, a UK company providing training courses (and occasional consultancy) in SQL, Reporting Services, Integration Services and Analysis Services, as well as in many other Microsoft software applications. You can see more about Wise Owl's SQL Server training courses here.
PhilDaniels
PhilDaniels
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 50
I do appreciate the author having presented this article in such a straightforward style..Clearly explained, great examples, and so on. Nicely done.

I'll probably take some heat for this (pardon the pun) but, for the life of me, I cannot figure out why companies would continue to use SSRS. It takes so long to create simple things that, frankly, are much much easier to do with other tools. Given the amount of time and complexity needed to do basic BI things, it seems to negate the cost savings and delay realization of BI's value in the organization. I realize you can code alot of custom things in SSRS, but if you have to create a custom class and write code to support something as simple as this heatmap example, I believe you are using the wrong BI tools. This takes literally 2 minutes in any data discovery platform...no coding needed.

Probably just stirred up trouble. I have always been a SQL Server guy from a DW-perspective and always wanted SSRS to be a true contender in the BI space. I just have never really seen it, nevermind what Gartner says.
jcrawf02
jcrawf02
SSCrazy Eights
SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)

Group: General Forum Members
Points: 8052 Visits: 19324
Phil, I think you have a point, this is slightly overkill. I tend to avoid custom coding where possible, you can do this in the text box properties directly (modified to show a black to red continuum for ease of use):

="#" & Right("0" & Hex(RGB((Fields!Num.Value/Max(Fields!Num.Value,"dsBounds"))*255,0,0)), 2) & "0000"



I set my text to white so it would show up when the value was all black, I'm sure this could be further tweaked to make it prettier.

**Edit - sample crappy report attached

---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Attachments
Report1.pdf (65 views, 2.00 KB)
Barry ONeill
Barry ONeill
SSC Rookie
SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)

Group: General Forum Members
Points: 31 Visits: 95
I have used the code from this website effectively in the past, and felt it worth sharing as, to me, it was a much more convenient approach:
http://blogs.msdn.com/b/bobmeyers/archive/2009/07/31/add-excel-like-color-scale-conditional-formatting-to-your-reports.aspx
Also makes reference to this one.
rfr.ferrari
rfr.ferrari
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3093 Visits: 13645
Thanks AndyOwl!!!! your article is easy and simple to understand and very useful too!!!


rfr.ferrari
DBA - SQL Server 2008
MCITP | MCTS

remember is live or suffer twice!
the period you fastest growing is the most difficult period of your life!

dj1202
dj1202
Right there with Babe
Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)

Group: General Forum Members
Points: 791 Visits: 231
Way too complicated imo. I would simply create a view that joins on a range table with degree values like "high," "medium," "low" and then use boolean expressions to set the background color of the cells depending on these values.
nick.ryan
nick.ryan
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 35
Agree totally with your sentiments.

I also think the author should not apologise for being from the UK. I think that gives him and advantage when it comes to the English language and the correct order of dates. :-)
Robert vd Berg
Robert vd Berg
Old Hand
Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)

Group: General Forum Members
Points: 326 Visits: 334
Even more simple: use the expression builder and nested IIf to set the colour directly by name, e.g.:

=IIf(Fields!Num.Value/Max(Fields!Num.Value,"DSBounds") > 0.25,IIf(Fields!Num.Value/Max(Fields!Num.Value,"DSBounds") > 0.5,"HotPink","Pink"),"White")

Robert van den Berg

Freelance DBA
Author of:
Database Fundamentals Microsoft Technology Associate exam 98-364
OldCursor
OldCursor
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 162
I agree with SSCrazy. The class and other custom code is wholy unnecessary. It's a simple matter to either generate a hex colour code string in the SQL code, or directly as an expression in the report.

I'm most in favour of the former - i.e. driving the report from a stored procedure that can dynamically get the upper and lower bounds and calculate a hex string appropriate to each value.

It's good to know that it is possible (and not too complicated) to create fancy custom code for things that might need it - although I've been developing reports for some years now and haven't yet found a need to do so.

SSRS is a very capable tool, intuitive and flexible and does not require a lot of learning. And SQL Server Central is just the dogs b**** for getting the support you need!
roworthm
roworthm
SSC-Enthusiastic
SSC-Enthusiastic (195 reputation)SSC-Enthusiastic (195 reputation)SSC-Enthusiastic (195 reputation)SSC-Enthusiastic (195 reputation)SSC-Enthusiastic (195 reputation)SSC-Enthusiastic (195 reputation)SSC-Enthusiastic (195 reputation)SSC-Enthusiastic (195 reputation)

Group: General Forum Members
Points: 195 Visits: 68
I'd agree. It's using a sledgehammer to crack a nut. You already have two technologies that can perform the colour calculation fairly simply: SQL or SSRS. Doesn't need another. On the other hand, it is a good example for integrating a C# assembly into SSRS where required.

Just wondering, because I couldn't figure it out, does the additional assembly set on the reporting server, or does it need to be deployed to the client machines? Hopefully the former.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search