Search code examples
reporting-servicesssrs-2008ssrs-2008-r2ssrs-2012

multiple conditional formatting in SSRS report


Hi i have 2 conditions for a column in an SSRS report.

if Expirationdate <= Begdate  then red 
if Begdate <Expirationdate<Enddate then orange
else white.

This is what i have currently.

=iif((Fields!EXPIRATIONDATE.Value <= Parameters!BEGDATE.Value), "Red"
,iif((Fields!LICENSENUM.Value<Parameters!BEGDATE.Value) and (Fields!LICENSENUM.Value>Parameters!ENDDATE.Value)) , "Orange","White")

is there something i am doing wrong?


Solution

  • I think you have too many IIFs and brackets.

    Try this:

    =iif(Fields!EXPIRATIONDATE.Value <= Parameters!BEGDATE.Value, "Red", iif(Fields!LICENSENUM.Value < Parameters!BEGDATE.Value and Fields!LICENSENUM.Value > Parameters!ENDDATE.Value , "Orange", "White"))