none
Visibility formula for checking on two fields for deciding on visibility of row

    Question

  • I have a row that has groups in it where I need to check for Risks and Issues availability and if both are not there, make the row invisible.  If either of them or both are there, go ahead and display.  I have the following expression for one of them and it works for the risk group but for the life of me I cannot figure out how to check for both risk and issue fields; have tried many different possibilities but it keeps telling me the syntax is invalid.  Any ideas would certainly be helpful. 

    =Iif(IsNothing(Fields!Risk_Title.Value),True,False)


    Cletus51

    Friday, December 13, 2013 11:59 PM

Answers

  • Hi ,

    You were almost there , consider below is my dataset :

    DECLARE @Tmp TABLE (Id INT ,Risks CHAR(3),Issues CHAR(3))
    INSERT @Tmp SELECT 1,'X','Y'
    INSERT @Tmp (Id,Risks) SELECT 2,'X'
    INSERT @Tmp (Id,Issues) SELECT 3,'Y'
    INSERT @Tmp (Id) SELECT 4
    SELECT * FROM @Tmp

    Set Row Visibility expression like shown below :

    =IIF(IsNothing(Fields!Risks.Value) AND IsNothing(Fields!Issues.Value) ,True,False)

    Reference - http://www.allaboutmssql.com/2013/01/ssrs-isnothing-decision-function.html


    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

    Saturday, December 14, 2013 3:43 AM
  • Your statement syntax worked...thanks!  However, due to the way I have two rows structured, for the second row, in order to not display the project name twice, I had to use your statement in the negative (inverse).  Here it is.  Again, statement worked. 

    =IIF (Not IsNothing(Fields!Risk_Title.Value) and Not IsNothing(Fields!Issue_Title.Value) ,True,False)


    Cletus51

    • Marked as answer by Portfoliodude Sunday, December 15, 2013 3:21 PM
    Sunday, December 15, 2013 3:21 PM

All replies

  • Hi ,

    You were almost there , consider below is my dataset :

    DECLARE @Tmp TABLE (Id INT ,Risks CHAR(3),Issues CHAR(3))
    INSERT @Tmp SELECT 1,'X','Y'
    INSERT @Tmp (Id,Risks) SELECT 2,'X'
    INSERT @Tmp (Id,Issues) SELECT 3,'Y'
    INSERT @Tmp (Id) SELECT 4
    SELECT * FROM @Tmp

    Set Row Visibility expression like shown below :

    =IIF(IsNothing(Fields!Risks.Value) AND IsNothing(Fields!Issues.Value) ,True,False)

    Reference - http://www.allaboutmssql.com/2013/01/ssrs-isnothing-decision-function.html


    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

    Saturday, December 14, 2013 3:43 AM
  • Your statement syntax worked...thanks!  However, due to the way I have two rows structured, for the second row, in order to not display the project name twice, I had to use your statement in the negative (inverse).  Here it is.  Again, statement worked. 

    =IIF (Not IsNothing(Fields!Risk_Title.Value) and Not IsNothing(Fields!Issue_Title.Value) ,True,False)


    Cletus51

    • Marked as answer by Portfoliodude Sunday, December 15, 2013 3:21 PM
    Sunday, December 15, 2013 3:21 PM