Multiple Colour conditions for rows based on different columns

  • Hi all,

    Id like to create a report based on table about agent jobs.

    Id like a row to be say Dark Red if the job is disabled. (based on the Enabled Column 1 = enabled 0 = disabled)

    If the job failed id like it red (based on column LastRan of text Job Failed, Job finished. )

    I can get it working for 1, but not sure how to do both!?

    thanks for any help.

  • Well thought i had the logic for it right. But not sure how SSRS does nulls? and well this doent work anyway. but I have

    Enabled Col can either be a 1 or a 0

    ID col can either be NULL, "The job succeeded" or "the job Failed"

    =Switch (

    Fields!Enabled.Value = 0 , "DarkRed",

    Fields!Enabled.Value = 1 AND Fields!ID = "The job failed.", "RosyBrown",

    Fields!Enabled.Value = 1 AND Fields!ID = "The job succeeded.", "MistyRose",

    Fields!Enabled.Value = 1 AND Fields!ID = "NULL" , "White"

    )

    I get the error:

    contains an error overload resolution failed because no accessible = can be called with these arguments

  • The .Value is missing from the ID field.

    Fields!ID.Value = ".....",

  • Resolved.

    I had missed the .Value for the AND parts.

    =Switch (

    Fields!Enabled.Value = 0 , "DarkRed",

    Fields!Enabled.Value = 1 AND Fields!ID.Value = "The job failed.", "RosyBrown",

    Fields!Enabled.Value = 1 AND Fields!ID.Value = "The job succeeded.", "MistyRose",

    Fields!Enabled.Value = 1 AND Fields!ID.Value = "NULL" , "White"

    )

Viewing 4 posts - 1 through 3 (of 3 total)

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