0

Report Builder 3.0 I have 2 columns - one is est hours - one is act hours I want to change the hours in the act to "red" when it is higher than the estimate hours

I have tried the following

IIF(Fields!AcutalHours.Value > Fields!Estimate_Hours.Value "Red"

and I have tried the following

=Switch(Fields!Estimate_Hours.Value < Fields!AcutalHours.Value, "Black"), =Switch(Fields!AcutalHours.Value > Fields!Estimate_Hours.Value, " Red ")

I am using the font expression

whoan
  • 8,143
  • 4
  • 39
  • 48
lin
  • 1
  • 1

2 Answers2

0

Are the fields definitely Numeric? Try converting them to Int to ensure it's comparing them as numbers.:

=Iif(CInt(Fields!ActualHours.Value) > CInt(Fields!Estimate_Hours.Value), "Red", "Black")

Dan Scally
  • 1,922
  • 1
  • 19
  • 31
0

You can add a new calculated field to your Dataset in ReportBuilder with a formula like this:

=IIF(InStr(Fields!Original.Value,Fields!Updated.Value)>0, "White","Red")

Once that is done, Select the properties of the field that needs to be formatted, select fill, formula and set the expression for the BackgroundColor to

=Fields!MyCustomDiffField.Value

I use this method of formatting in Report Builder 3.0

callisto
  • 4,921
  • 11
  • 51
  • 92