November 30, 2012 at 3:53 am
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.
November 30, 2012 at 6:48 am
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
November 30, 2012 at 6:51 am
The .Value is missing from the ID field.
Fields!ID.Value = ".....",
November 30, 2012 at 6:51 am
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