Jeff
Jeff

Reputation: 21

Error on iif for color expression

I have this statement in my SSRS report.

=iif(
    ((Fields!lngCount2.Value-Fields!lngCount.Value)/Fields!lngCount.Value) > 0
        and Fields!strSegmentName.Value ="Struggler" 
        or Fields!strSegmentName = "Winback" 
        or Fields!strSegmentName.Value = "Former", 
            "Green" , 
                    iif(
                        ((Fields!lngCount2.Value-Fields!lngCount.Value)/Fields!lngCount.Value) < 0 
                            and Fields!strSegmentName.Value ="New" 
                            or Fields!strSegmentName = "Riser" 
                            or Fields!strSegmentName.Value = "High Value", 
                                "Green",
                                    "Red" )
)

I'm getting the below error.

An error occurred during local report processing. The definition of the report 'Main Report' is invalid. The Color expression for the textbox ‘textbox8’ contains an error: [BC30518] Overload resolution failed because no accessible '=' can be called with these arguments:

How can I resolve this error?

Upvotes: 2

Views: 3591

Answers (1)

SPE109
SPE109

Reputation: 2951

Think you're missing the '.value' on Fields!strSegmentName = "Riser" and or Fields!strSegmentName = "Winback"

Upvotes: 6

Related Questions