tanj1035
asked on
Color Fill expression SSRS
Hi Experts,
I want to add the expression for the textbox [MTDD1].
if [MTDD1] is nothing, shows light grey;
if [MTDD1] <[MTDS1], shows Red (in the attachment "preview", number 19 should show in red), otherwise shows CornflowerBlue.
I wrote the query, the SSRS can pass the expression, but the fill color did not apply. Can anyone help me on it. Thanks.
=switch(Fields!Step.Value = "Total" and Fields!MTDD1.Value<Fields! MTDS1.Valu e, "Red", "CornflowerBlue",
IsNothing(Fields!MTDD1.Val ue)
,"LightGrey"
, True
, Nothing
)
I want to add the expression for the textbox [MTDD1].
if [MTDD1] is nothing, shows light grey;
if [MTDD1] <[MTDS1], shows Red (in the attachment "preview", number 19 should show in red), otherwise shows CornflowerBlue.
I wrote the query, the SSRS can pass the expression, but the fill color did not apply. Can anyone help me on it. Thanks.
=switch(Fields!Step.Value = "Total" and Fields!MTDD1.Value<Fields!
IsNothing(Fields!MTDD1.Val
,"LightGrey"
, True
, Nothing
)
ASKER
Hi, Thanks for your reply.
I tried yours, but got the error message
"The BackgroundColor expression for the text box ‘MTDD1’ contains an error: [BC30588] Omitted argument cannot match a ParamArray parameter."
Actually, I am looking for the conditions like this
1)when Fields!Step.Value = "Total" and Fields!MTDD1.Value<Fields! MTDS1.Valu e, IT HAS TO show "Red", otherwise "CornflowerBlue"
2)when [MTDD1] except Fields!Step.Value = "Total" is nothing, shows light grey
I do not know if I express it clearly or not. Looking forward to hearing from you.
Thanks.
I tried yours, but got the error message
"The BackgroundColor expression for the text box ‘MTDD1’ contains an error: [BC30588] Omitted argument cannot match a ParamArray parameter."
Actually, I am looking for the conditions like this
1)when Fields!Step.Value = "Total" and Fields!MTDD1.Value<Fields!
2)when [MTDD1] except Fields!Step.Value = "Total" is nothing, shows light grey
I do not know if I express it clearly or not. Looking forward to hearing from you.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try this:
=switch(Fields!Step.Value = "Total" and IsNothing(Fields!MTDD1.Val
, Fields!Step.Value = "Total" and Fields!MTDD1.Value < Fields!MTDS1.Value, "Red",
, True , "CornflowerBlue"
)