none
Hide Rectangle based on several criteria RRS feed

  • Question

  • I have a rectangle that I am successfully hiding using this expression

    =First(Fields!category_name.Value <> "TAKE ACTION", "BodyWeight")

    However I now need to add a second criteria to this

    I need to hide where the above expression is true but also add criteria where pregnancy.value <>1

    How can i do this in a single statement when the dataset value is shows as  Sum(pregnancy)


    Captain Lann.

    • Moved by Amanda Zhu Friday, September 13, 2013 9:36 AM
    Thursday, September 12, 2013 7:52 PM

All replies

  • Hello,

    I have moved this thread to SQL Server Reporting Services, Power View forum for better response.

    Best regards,


    Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, September 13, 2013 9:37 AM

  • Hi,

    Anyways, I'm not sure what version of SSRS you are using, I'm on SSRS 2008 R2 and this worked for me.

    Example :   On your Rectangle Hidden property do an Expression like this 

    =CountRows("FirstDataSet") > 5 ANDALSO CountRows("SecondDataSet") > 5 ANDALSO CountRows("ThirdDataSet") > 5
    

    In the same way you can also check both the conditions with ANDALSO operator.

    Hope this helps.

    Thanks & Regards

    Venkatesh P N

    Friday, September 13, 2013 12:23 PM
  • Hi Amanda,

    You can use the below expression for hiding the rectangle with both the mentioned condition:

    =IIF(First(Fields!category_name.Value, "BodyWeight") <> "TAKE ACTION",IIF(Fields!pregnancy.value <>1,TRUE,FALSE),False)

    Thanks,

    Vishal

    Friday, September 13, 2013 2:37 PM
  • so my issue is that on the second field( pregnancy) in the list of fields to select is is listed as Sum(pregnancy)

    Captain Lann.

    Monday, September 16, 2013 6:21 PM