Parent-Child Cell Setting

  • Last update:September 27, 2024
  • Overview

    Version

    Report Server Version
    11.0

    Application Scenario

    Parent/Child cells are concepts closely related to cell expansion. Cell expansion applies to one specific cell. If multiple cells are bound in the report body, are these cells related during expansion, and do the expansion directions of these cells affect each other?

    Take the Region and Salesperson fields as an example. A hierarchical relationship exists between these two fields. That is to say, each region has multiple different salespersons. In this case, you want to show the hierarchical relationship between these two fields during cell expansion, that is, to display the values of these two fields by group. You can achieve this effect by the parent-child cell setting in FineReport.

    In the following figure, the Region field is the parent cell, and the Salesperson field is the child cell. For details about specific setting methods, see section "Example."

    父子格设置 图1.png

    Function Description

    During report design in FineReport, the cell that is set as the parent cell of a selected cell is marked with a blue arrow.

    父子格设置 图2.png

    FineReport supports two types of parent-child cell settings.

    • Left Parent Cell: If a vertical expansion relationship exists between cells, set the left parent cell.

    • Up Parent Cell: If a horizontal expansion relationship exists between cells, set the up parent cell.

    父子格设置 图3.png

    Example

    When you set the left/up parent cell of a child cell in the designer, three options (None, Default, and Custom) are available in the drop-down list.

    The following uses how to set the left parent cell during vertical cell expansion as an example to specifically describe the application scenarios and effects of the three options for parent-child cell settings.

    父子格设置 图4.png

    None

    If you select None, no parent cell is set. That is to say, the grouping relationship between cells is not taken into consideration during cell expansion.

    Select cell B2, choose Cell Attribute > Expansion on the right attribute panel, use the default setting (Vertical) of Expansion Direction, and set Left Parent Cell to None.

    父子格设置 图5.png

    The following figure shows the report effect.

    父子格设置 图6.png

    Default

    When the left or up cell adjacent to a selected cell has an expansion attribute, the left cell is the left parent cell of the selected cell, or the up cell is the up parent cell of the selected cell by default.

    If you select Default, the up cell (in which values are expanded horizontally) or left cell (in which values are expanded vertically) adjacent to the cell into which a data column is dragged is automatically used as the up parent cell or left parent cell.

    iconNote:

    1. The setting takes effect only for adjacent cells in the same row or column. For non-adjacent cells, you need to customize the setting.

    2. When the left cell adjacent to a selected cell does not have the expansion attribute, the system will use the left or up cell that has the expansion attribute (searched in sequence) as the parent cell of the selected cell.

    Select cell B2, choose Cell Attribute > Expansion on the right attribute panel, use the default setting (Vertical) of Expansion Direction, and set Left Parent Cell to Default. Because the values in A2 (left cell of B2) are vertically expanded, the default left parent cell of B2 is A2.

    父子格设置 图7.png

    The following figure shows the report effect.

    父子格设置 图8.png

    Custom

    If cells between which an expansion relationship exists are not adjacent to each other, the default setting cannot be used. In this case, you can select Custom to set the parent-child relationship between them.

    Cells A2 and B3 are not adjacent, but a vertical expansion relationship exists between them. Select cell B3, choose Cell Attribute > Expansion on the right attribute panel, use the default setting (Vertical) of Expansion Direction, set Left Parent Cell to Custom, and select A2.

    父子格设置 图9.png

    The following figure shows the report effect.

    父子格设置 图10.png

    Root Parent Cell

    Another concept, root parent cell, is added as a supplement here, which may be involved in other documents.

    Strictly speaking, a root parent cell can be a leftmost parent cell (for vertical expansion) or an upmost parent cell (for horizontal expansion).

    The root parent cell does not refer to the cell at the far left or top, but the leftmost or upmost cell in terms of the parent-child relationship.

    For example, in detailed table where data is vertically expanded, the left parent cell of A2 is B2, and the left parent cell of C2 is A2. In this case, B2 is the root parent cell (actually the leftmost parent cell).

    父子格设置 图11.png

    The following figure shows the table preview effect.

    父子格设置 图12.png

    The root parent cell has the following characters:

    • Child cells (in which values are expanded following the root parent cell) exist. That is to say, the root parent cell is set as the parent cell of these child cells.

    • The root parent cell itself does not have a parent cell. So the expansion of values in the root parent cell is not affected by other cells.

    Attachment List


    Theme: Report Application
    Already the First
    Already the Last
    • 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