toggle all

I have seen other places where this question is asked, but I am still not seeing the answer clearly. If I have many groups that are collapsed and I want to expand them all at the same time, it there a way to accomplish this? Many talk about a param that can be passed in, but even if you have the parameter set, this is only for the initail state, is it not?
[358 byte] By [Woyler] at [2007-12-22]
# 1
No, it's not only for the initial state. The report will be refreshed when the parameter value changes. So if you set the hidden property on the groups to be dependent on the parameter value, e.g. =IIF(Parameters!ShowAllGroups.Value, false, true). By setting the value of the ShowAllGroups parameter to true, the groups in the re-rendered the report will be expanded.
FangWang-MSFT at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 2

Correct, the parameter controls the initial state of the show/hide after the report is processed. This is really no different than when you click on an individual toggle image for a single group because the report is also being reprocessed then.

-Chris

ChrisBaldwin-MSFT at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 3

I appreciate your responses. I understand the concept , but it is not working for me in practice. Assume the following structure of animals with the names;

Dogs

Rex, Sam, Max

Cats

Ed, Ann, Bill

Dogs and Cats group can be toggled to display the names. The Names are the details row. Do I use the parameter expression on the "hidden" property of the details row?

Woyler at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 4

Use the expression for the Initial Visibility setting in the Detail rows group. Right click on the detail row and select "Edit group".

-Chris

ChrisBaldwin-MSFT at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 5
Thank you Chris, that fixed me up. Is it normal for the toggle images (+/-) to be reversed after applying the expression?
Woyler at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 6
Woyler,

you are correct. the image icons seem to be reversed. i

have written a code for changin the image state based on the paramter

passed. but it does not behave normally. howvever, if i write a code

without applying the visibility setting as pointed out by Chris, it

does work.

is it some kind of bug in Reporting Services.

Anandam at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 7

You can change the initial toggle image state by right-clicking on the textbox, opening the textbox properties dialog and selecting the "Visibility" tab. The bottom of that dialog tab has a section titled "Initial appearance for the toggle image of this report item". You can set the initial toggle image either statically or based on an expression value.

-- Robert

RobertBrucknerMSFT at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 8
Does the report refresh in this case immediately after changing a parameter value or do I need to click on "view report" (re-run the whole report) to refresh it ?
jan.zajic at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...
# 9

My initial toggle visibility and images are working just fine with the parameter solution. I did the following:

  1. Add a new report parameter:

    • Name: ExpandCollapseAll

    • Data type: Boolean

    • Prompt: Expand / Collapse All

    • Available values:

      • Non-queried

        1. Label: Collapse All. Value: False.

        2. Label: Expand All. Value: True.

    • Default values:

      • Non-queried

        • Value: =False.

  2. For each Toggle Control Item (item that controls the visibility of another item)

    1. Right-click item and select Properties

    2. Select Visibility tab

    3. Initial appearance of the toggle image for this report item:

      • Expression:

        • Value: =Parameters!ExpandCollapseAll.Value.

  3. For each Toggling Item (item that shows and hides)

    1. Right-click item and select Properties

    2. Select Visibility tab

    3. Initial visibility:

      • Expression:

        • Value: =Not Parameters!ExpandCollapseAll.Value.

    4. Check Visibility can be toggled by another report item

    5. Select the corresponding Toggle Control Item

Note that "Not" is used in the Toggling Item. Here is a helpful key:

  • Toggle Control Item:

    • True = Expanded (-)

    • False = Collapsed (+)

  • Toggling Item:

    • True = Hidden

    • False = Visible

In this example, you must change the parameter value and click on "View Report" button to refresh it.

Aaron-SoftEng at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Reporting Services...

SQL Server

Site Classified