SSRS: The expansion and the effect of grouping aggregation in reports and the techniques of dealing with irregular hierarchies

Source: Internet
Author: User

Expansion and collection of grouped aggregations in reports and techniques for dealing with irregular hierarchies (do not expand without child elements, delete + symbols)

The expansion and the effect of packet aggregation is very common in the SSRS, and sometimes there are some more special situations to deal with. For example, when grouping merge, some hierarchies are irregular, and some groups have two layers, what should be done in this situation?

Note that the following requirements, if there is no other France below, do not show the + number, if the United states-utah/minnesota states do not have the children of the city, they do not show the + number.

Such requirements are occasionally encountered in the SSRS, which can be understood as how to handle display and concealment problems in asymmetric hierarchies.

The techniques shown below first review how to group vertically, using the table control instead of using Tablix. Finally, it shows how to not display the + number when there is no child hierarchy, so as not to mislead users into making unnecessary clicks.

The demo database used is AdventureWorks2012, in order to show the problem caused by irregular layers, the SQL in the dataset is written intentionally like this-

SELECT countryregionname
            countryregionname = ' France ' THEN ' ELSE stateprovincename end as
                  stateprovi  Ncename, when
            countryregionname = ' France ' THEN ' "when city = ' Nevada ' THEN '" when city
                   = ' Duluth ' THEN "ELSE City" as City
                 ,
            SalesQuota,
            SalesYTD,
            saleslastyear from 
Sales.vsalesperson
WHERE countryregionname in (' United States ', ' United Kingdom ', ' France ')

The following starts by creating a report and adding DataSource, DataSet, and table controls and populating the data

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.