SSRs advanced series: how to perform multi-level groups and automatically expand

Source: Internet
Author: User

The so-called multi-level groups is a multi-layer groups with a tree structure (+-), similar to this effect, but also can automatically expand

First, the querystring or stored procedure in the dataset (Data Source) should not contain group. Then add multiple (multi-layer) groups in the new report Wizard:

Next, select these options:

In this way, the table of multi-level groups can be displayed.

 

However, you will find that these hierarchical tree structures cannot be automatically expanded, and you need to click + numbers one by one. If there are many nodes, it will be inconvenient. So the next step is how to make the hierarchy expand automatically?

Go to the layout page, click reports-Report parameters in the menu, and add a query parameter to the report so that the user can choose whether to expand automatically by default. This parameter is defined as follows:

Click the first cell in the row of the first group in the table:

Set the initialtogglestate attribute to the following expression in the attribute:

Click the row header of the second group in the table, right-click the second group, and select Edit Group .... Go to the visibility page and set it as follows:

If the next level also needs to be automatically expanded, the principle is the same as above. Note that you should set the name of the first cell of the next level parent group.

If you set all levels, you can easily add the button "Expand All" based on whether the report parameters are automatically expanded. Click this textbox to set properties, link to the parameter we added earlier.

This article ends. (The above SSRS is for sqlserver2005. If it is 2008, you can refer to this article.Article)

Note: You can download this document based on SSRS (SQL Server reporting services.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.