The document discusses using conditional formatting in reports by creating conditions with expressions. It provides examples of changing colors using IF statements, using SWITCH to create color bands based on price ranges, creating alternating row colors, and formatting text bold or normal based on price. Copyright information is also provided.
2. Copyright 2014 ? Ram Kedem. All rights reserved. Not to be reproduced without written consent. ramkedem.com
Conditional Formatting In Reports
?Using Expressions to create Conditions
?Changing Colors using IF
?Using Switch to create color bands
?Creating alternating row colors
?Formatting text using expressions
3. Copyright 2014 ? Ram Kedem. All rights reserved. Not to be reproduced without written consent. ramkedem.com
Using Expressions to create Conditions
Used Query :
SELECTproductId, ProductName, unitPrice, unitsInStock, UnitsOnOrder
FROMNorthwind.dbo.products
4. Copyright 2014 ? Ram Kedem. All rights reserved. Not to be reproduced without written consent. ramkedem.com
Using Expressions to create Conditions (IF)
5. Copyright 2014 ? Ram Kedem. All rights reserved. Not to be reproduced without written consent. ramkedem.com
Using Expressions to create Conditions (IF)
?=IIf(Fields!unitsInStock.Value<Fields!UnitsOnOrder.Value, "Red", "Black")
6. Copyright 2014 ? Ram Kedem. All rights reserved. Not to be reproduced without written consent. ramkedem.com
Using Expressions to create Conditions (SWITCH)
?=Switch(Fields!unitPrice.Value<10, "LightGreen" , Fields!unitPrice.Value<20, "Turquoise", Fields!unitPrice.Value< 30 , "Teal" , TRUE , "MidnightBlue")
7. Copyright 2014 ? Ram Kedem. All rights reserved. Not to be reproduced without written consent. ramkedem.com
Alternating Row Colors
?=IIf(RowNumber(NOTHING) MOD 2 = 0, "Plum" , "White")
8. Copyright 2014 ? Ram Kedem. All rights reserved. Not to be reproduced without written consent. ramkedem.com
Formatting Text Using Conditions
=IIf(Fields!unitPrice.Value>50, "Bold","Normal")