Conditional Formatting based on Parameters

  • Hello

    I want to know how to handle parameter passing, below is a similar to what I need to do:

    =IIF(Parameters!Product.Value="ABC" AND IF EXAM_STATUS =1 , "White"

    IF EXAM_STATUS =2 , "Blue"

    =IIF(Parameters!Product.Value="XYZ" AND IF EXAM_STATUS =1 , "Red"

    IF EXAM_STATUS =2 , "Green"

    Thanks.

  • dbmehta (5/18/2011)


    Hello

    I want to know how to handle parameter passing, below is a similar to what I need to do:

    =IIF(Parameters!Product.Value="ABC" AND IF EXAM_STATUS =1 , "White"

    IF EXAM_STATUS =2 , "Blue"

    =IIF(Parameters!Product.Value="XYZ" AND IF EXAM_STATUS =1 , "Red"

    IF EXAM_STATUS =2 , "Green"

    Thanks.

    I assume these two are mutually exclusive because they appear to be in conflict.

    What happens when Parameters!Product.Value="ABC" AND IF EXAM_STATUS =1 , "White"

    is not true and IF EXAM_STATUS =2 , "Blue" is not true? There appear to be conditions that are not evaluated.

    Same question, more or less for the second expression.

  • I have 3 parameters:

    ABC

    XYZ

    ZZZ

    If ABC is not true or XYZ is not true then don't do anything. Don't colour.

    At the moment I have the below but now need colours for XYZ as well:

    =IIF(Parameters!Product.Value<>"ABC","Whitesmoke",

    iif(max(Fields!Status.Value) = 1,"White",

    iif(max(Fields!Status.Value) = 2,"White",

    iif(max(Fields!Status.Value) = 3,"#BFBFBF"))))

  • I am still not sure what you are trying to get here but I think this is it:

    =IIF(Parameters!Product.Value<>"ABC",IIF(Parameters!Product.Value<>"XYZ","Whitesmoke",iif(max(Fields!Status.Value) = 1,"White",

    iif(max(Fields!Status.Value) = 2,"White",

    iif(max(Fields!Status.Value) = 3,"#BFBFBF")))),

    iif(max(Fields!Status.Value) = 1,"White",

    iif(max(Fields!Status.Value) = 2,"White",

    iif(max(Fields!Status.Value) = 3,"#BFBFBF")))))

    I might be missing a ( or a ) somewhere.

  • May be I am not explaining it properly. Basically, what I have at the moment is the below. If parameter is not ABC then colour it whitesmoke but if it is ABC then do the following:

    =IIF(Parameters!Product.Value<>"ABC","Whitesmoke",

    iif(max(Fields!Status.Value) = 1,"White",

    iif(max(Fields!Status.Value) = 2,"White",

    iif(max(Fields!Status.Value) = 3,"#BFBFBF",

    iif(max(Fields!Status.Value) = 4,"#FF0000","#F2F2F2")))))

    Now if the parameter being passed is not ABC but XYZ then the STATUS colour should be different, something like below:

    =IIF(Parameters!Product.Value<>"XYZ","Whitesmoke",

    iif(max(Fields!Exam_Status.Value) = 1,"Blue",

    iif(max(Fields!Exam_Status.Value) = 2,"Green",

    iif(max(Fields!Exam_Status.Value) = 4,"#FF0000","#F2F2F2"))))

    Again if the condition does not match, i.e. parameter is not either ABC or XYZ then default it to WhiteSmoke.

    Can I change <>ABC & <>XYZ to =ABC , =XYZ?

    Hopefully I have made some sense this time???

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

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