Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Conditional formatting with Reporting Services Expand / Collapse
Author
Message
Posted Thursday, March 25, 2010 9:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 22, 2013 12:58 PM
Points: 3, Visits: 49
any ideas on how to format a cell when the cell in the previous row has a different value.
Post #889893
Posted Thursday, March 25, 2010 9:10 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 11, 2014 10:13 AM
Points: 17, Visits: 145
What are you looking to do specifically?

If it's from a cell and you want just that value to change format on another cell in the Expression of the cell you want changed you can reference the other cell by using ReportItems!<cell name>.Value

But to really help, if you could provide an example of what you are trying to do, I maybe able to get you where you want to go :)


Frederick (Fred) J. Stemp, Jr.
Database Administrator
Southern Insurance Underwriters, Inc.

'...if they take my stapler then I'll set the building on fire...'
Post #889903
Posted Thursday, March 25, 2010 9:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 22, 2013 12:58 PM
Points: 3, Visits: 49
I have a Width column. I need to change the format of the cells in the Width column.

I would like the font to be Dark Blue if the Width value in the cell is different than the Width value in the cell in the previous row.
Post #889923
Posted Thursday, March 25, 2010 10:06 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 11, 2014 10:13 AM
Points: 17, Visits: 145
Does the column's property allow it to auto grow? If not how are you setting the width property?

Frederick (Fred) J. Stemp, Jr.
Database Administrator
Southern Insurance Underwriters, Inc.

'...if they take my stapler then I'll set the building on fire...'
Post #889964
Posted Thursday, March 25, 2010 10:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 22, 2013 12:58 PM
Points: 3, Visits: 49
sorry, its confusing. The column value is for Width for a product. Like 12ft or 10ft or 8 ft. I want to change the font color propery of this.
Post #889976
Posted Thursday, March 25, 2010 10:38 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 11, 2014 10:13 AM
Points: 17, Visits: 145
No worries :) We can do this like this:

1. In the properties of the column you want the color chnage to occur, go to Appearance | BackgroundColor and select the drop down <Expression...>. Then you'd do something like this for a Table:

=swithch(isnothing(Fields!Width.Value) = 0, "transparent",
Fields!Width.Value = <your value/threshold>, "green",
Fields!Width.Value = <your value/threshold>, "yellow",
Fields!Width.Value = <your value/threshold>, "red")

You may not need a IsNothing statement but I provided one just in case your dataset does return NULL values. Now the Fields!Width.Value can use other aggregates like <>, <, > , =. You can also Use OR and AND statements if you want to set the condition to look at two different columns. You can also use IIF instead of SWITCH. My preference is SWITCH because nesting IIF statements can get confusing :)

In a Matrix you should/may need to use an aggregate like SUM, AVG, MIN and so forth before Fields!Width.Value

I hope that is of some help. :) Let me know if I can help more!


Frederick (Fred) J. Stemp, Jr.
Database Administrator
Southern Insurance Underwriters, Inc.

'...if they take my stapler then I'll set the building on fire...'
Post #889997
Posted Wednesday, May 12, 2010 10:30 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, November 15, 2010 8:09 AM
Points: 83, Visits: 10
What if I am calculating sum of values in a matrix and then based on the results would like to find out the max or min and not from the main select query itself ? I guess an example scenario will be useful , if Yes please let me know and I'll provide one...
Post #920661
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse