Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > Reporting Services
| Search | Today's Posts | Mark Forums Read
Reporting Services SQL Server Reporting Services. Please specify which version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Reporting Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 27th, 2015, 08:48 AM
Authorized User
Points: 58, Level: 1
Points: 58, Level: 1 Points: 58, Level: 1 Points: 58, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Highlight the Background based on expression

Hi

I have a table with 5 columns and I want to put this expression for the background color;
IIf xi > avg(x) + 3*stdev(x) OR xi < avg(x) - 3*stdev(x) THEN highlight


This is what I want to achieve, if column one is XI; then column 2,3,4 is X.
Then do this: Starting from column one, for to highlight column one, I firstly have to get the avg of column 2,3,4 and 5, add it with (3 * standard deviation of column 2,3,4 and 5 values) , then see if the value I get is below column one(which is XI on this instance),

And the same applies for other columns, if I want to see if I can highlight column two, I need to get the avg of column 1,3,4 and 5, then add that with (3 * standard deviation of column 2,3,4 and 5 values) then see if the value I get is below column two(which is XI on this instance).

Please help me on how can I get around this issue, or maybe if that's a better way.
  #2 (permalink)  
Old January 27th, 2015, 12:40 PM
Wrox Author
Points: 183, Level: 3
Points: 183, Level: 3 Points: 183, Level: 3 Points: 183, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Vancouver, Washington, USA.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Highlight the Background based on expression

It would be helpful if you would post a sample of your data source and then give a specific example or two of the intended logic. Please show the column names and values for all five columns and a few records. Something like this, perhaps:
ColName1, ColName2, ColName3, ColName4, ColName5
1,3,4,7,2
5,2,3,6,5
3,4,6,8,2

Change background color of Col1 if ...
Change background color of Col2 if ...
...
__________________
Paul Turley
Mentor | SQL Server MVP, SolidQ
Blog: sqlserverbiblog.com
Author: SQL Server Reporting Services Recipes for Designing Expert Reports; Professional SQL Server Reporting Services (2000, 2005, 2008 & 2012), Beginning T-SQL (2000, 2005 & 2008), SSIS, SSAS & Access


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 14 Lambda Expression as Delegates and Expression Trees TJinWI BOOK: Beginning Object-Oriented Programming with C# 3 July 16th, 2013 10:05 AM
Change background color based on two field data at SQL Server 2008 R2 jjjane BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 June 1st, 2012 11:53 AM
Highlight a row based on cell content needhelptdot Excel VBA 0 September 8th, 2011 12:42 PM
background-color vs background-image cangrejero CSS Cascading Style Sheets 1 February 20th, 2011 09:39 PM
change background color of cell based on value vurtman ASP.NET 1.0 and 1.1 Basics 4 February 26th, 2004 03:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.