Sort by Group Summary

  • Last update:  2024-02-21
  • Overview

    Description

    Grouped reports may have various subtotals, totals, and lists. In this case, you may wonder how to sort them layer by layer according to each grouping.

    As shown in the following figure, you can sort the Salesperson Subtotal first, then the Product Type Subtotal, and finally the Product List.

     1.png

    Solution

    The sorting of different values is totaled based on the left parent cell, so you can use the Sort After Expansion function on the corresponding left parent cell to make it.

    Example

    Data Preparation

    Create a general report, create a database query ds1, and enter the SQL statement SELECT * FROM Sales_Volume WHERE Region='North China'.

     2.png

    Report Design

    Table Content

    Drag the data columns from ds1 into the table, and enter the formula SUM(D2) in cell D3, and SUM(D3) in cell D4, as shown in the following figure.

     3.png

    Left Parent Cell Setting

    Set the left parent cell of cells B3 and D3 to B2, and cells A4 and D4 to A2.

    Taking the left parent cell of B3 as an example, the steps are shown in the following figure.

     4.png

    Sort After Expansion Setting

    The following table describes specific settings.

    Cell

    Sort After Expansion

    Sorting Formula

    A2

    Ascend

    D4

    B2

    Ascend

    D3

    C2

    Ascend

    D2

    Taking cell A2 as an example, the steps are shown in the following figure.

     5.png

    Effect Display

    On PC

    Save the template and click Pagination Preview. The preview effect is shown in the following figure.

     6.png

    On Mobile Terminals

    The template can be previewed on both the mobile and HTML5 apps. The effect is shown in the following figure.

     7.png

    Template Download

    You can download the template.Sort by group summary.cpt


    Attachment List


    Theme: Report Application
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy