Color code based on 2 col values

  • My expression for backgrounfColor:

    =iif( Fields!ColA.Value<>Fields!ColB,"Red","Green")

    is returning wrong:

    Error is:

    The background color expression for the textbox 'ColA' contains an error:[BC30452] Operator <> is not defined for types Object and Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Field

    How do get over this.

    I a trying compare ColA and ColB values and if the values are not equal the color code that row as red if they are equal color code the row as green

  • Instead of

    =iif( Fields!ColA.Value<>Fields!ColB,"Red","Green")

    try

    =iif( Fields!ColA.Value=Fields!ColB,"Green","Red")

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply