Expand all/Collapse all RS2000

  • Hi all,

    I have several reports which initially display at a summarised level, but allow users to drill down using the standard visibility toggle. Our users need to 'expand all/collapse all', and the only way we have been able to achieve this is by providing a text box which hyperlinks back to the same report, but sends in a value of 'Expand' or 'Collapse' as required. This works, but means the whole report - including SQL query - must execute again, and that can take a long time, depending on the report.

    Can anyone think of a way to make the visibility of a report item be toggled by more than one item?

    I want to do this because we have about 5 levels, and up to 20 'members' under each level.

    Thanks,

    Matt.

  • What I have done with several reports is the following:

    • add a report parameter 'expand' as a boolean.
    • in each section that can be hidden, set the Visibility-Hidden value to

      =Parameters!expand.Value

    So, when the value is True, the sections will all be hidden - False, all visible.  The report should not query the database again, because this is just a filter on the report - not a database parameter.

    Hope this helps!

    Mike

  • Hmmm... Thanks Michael, though I am not certain that this will give me the behaviour I require. Though I'm pretty keen to try out that technique for things like turning on/off conditional font colouring for outlier analysis etc. Though I am sceptical that hitting 'View Report' after changing this parameter won't re-run the DB query. Fingers crossed!

    What I am hoping to achieve is this kind of scenario. Below, a user ran the report and all sections were collapsed. They expanded Section2, then SubSectionB and SubSectionC. They then decide they'd like to expand everything, so - ideally - they click Expand All. I'd like this to work without making 'Expand All' a link to another (or even the same) report - so as to avoid the DB query re-run. 

    + Expand All

    + Section1

    - Section2

         + SubSectionA

         - SubSectionB

              DetailRow1

              DetailRow2

         - SubSectionC

              DetailRow1

         + SubSectionD

    + Section3

    + Section4

    I'd like the user to be able to click on SubSectionA and get the detail rows in that SubSection, OR, Click 'Expand All' and have all Sections/SubSections fully expanded.

    Is that the type of thing that your solution can do?

    Cheers,

    Matt.

  • Yes, it will work with your scenario.  For instance, set DetailRow1 to be toggled by the first field in SubSectionB, and the SubSectionB row to be toggled by the first field in Section2.  Then, use the expression =Parameters!expand.Value in the DetailRow1 and SubSectionB row Visibility-Hidden property.  Then, set the default value of the parameter to be True (otherwise, collapse all items to the highest level).

    You will then be able to toggle one item at a time, or change the report parameter from True to False, which will in-turn expand all items.

    The other trick will be to use this same 'expand' parameter to set each toggle item's InitialToggleState property.  Use =IIF(Parameters!expand.Value=True, Collapsed, Expanded).

    Hope it works out!

    Mike

     

  • Mike,

    thanks for the clarification, I'll let you know how I go.

    Regards,

    Matt.

     

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

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