none
Expression to hide a rectangle with 2 charts RRS feed

  • Question

  • I have 2 reports in a single report

    Report 1: 

    This report has a tablix and a pie chart which displays member counts for genders

    Dataset is written such that the gender names are always displayed in the tablix even when the count is Zero for Female and Male


    Report 2: 

    This report has a tablix and a pie chart which displays member counts for category Age

    Dataset is written such that the age category names are always displayed in the tablix even when the count is Zero for age categories

    Both Report 1 and Report 2 are place in separate rectangles and then these 2 rectangles are place in one single rectangle.

    Now I want to hide this main rectangle with an expression.

    I have tried few expression and they did not work

    Tuesday, October 20, 2015 9:00 PM

Answers

  • Hi DReddyC,

    What expressions did you try for the Hidden property of the main rectangle?  For example, your expression must evaluate to a Boolean.

    ' a reversed logic example that always returns True
    =IIF(1 = 2, False, True)

    Regards,
    Carnegie


    Live healthier and achieve more. #MicrosoftBand

    Tuesday, October 20, 2015 11:05 PM

All replies

  • Hi DReddyC,

    What expressions did you try for the Hidden property of the main rectangle?  For example, your expression must evaluate to a Boolean.

    ' a reversed logic example that always returns True
    =IIF(1 = 2, False, True)

    Regards,
    Carnegie


    Live healthier and achieve more. #MicrosoftBand

    Tuesday, October 20, 2015 11:05 PM
  • Hi Dreddy,

    According to your description, you are trying to hide a rectangle base on an expression without success, right?

    In your scenario, there are two sub rectangle inside the main rectangle. So when hide the main rectangle, those two sub rectangle will be hidden. It's hard for us to give you the detail expression based on the limited information. Please provide us the logic to hide the rectangle. So that we can make further analysis. Here is a blog which describes how to hide rectangle in SSRS, please refer to the link below.
    http://nishantrana.me/2012/05/15/hiding-rectangle-in-ssrs/

    Regards,


    Charlie Liao
    TechNet Community Support

    Wednesday, October 21, 2015 2:16 AM
    Moderator
  • First report dataset has Gender and Member count

    Second report dataset has Age category and Member count

    I have used the following expression to hide the outermost rectangel

    =IIF(Sum(Fields!member_count.Value, "Dataset1")=0, true, false)

    Wednesday, October 21, 2015 4:23 PM
  • Your goal in this case is to hide the outermost rectangle if there are no rows in the two inner rectangles and the logic to hide the two inner rectangles works okay. Is this correct? If yes, use the Hidden property of the inner rectangles in your logic for the outermost rectangle. For example,

    = Rpt1InrRct.Hidden AND Rpt1InrRct.Hidden

    I hope this helps.

    Regards,
    Carnegie


    Live healthier and achieve more. #MicrosoftBand

    Wednesday, October 21, 2015 5:45 PM