Master-sub report

  • Last update:February 08, 2022
  • I. Overview

    1. Video learning

    For online video learning, please see: Master-sub report.

    Note: If there is any discrepancy between the document and the video, please refer to the document.


    2. Application scenarios

    Single-table main and sub-reports generally have more than two data sets, namely the data set of the main table and the data set of the sub-table. In terms of presentation, the main table is generally required to be displayed in a free format, and the sub-tables are displayed in a list format, which is one-to-many. relationship, there may be multiple subreports at the same time.

    The single-form master-sub-report is more convenient to operate, and data can be filled in. For details, please refer to: Master-Sub Data Entry Report .


    II. Examples

    The data in this report is displayed in two areas: order information and order details. These two tables display order related data, that is, they are all for the same object "order", but they display different detailed order data. We call "order information" and "order details" sub reports, and the report made up of "order information" and "order details" is called the main report (this report is the main report).

    截屏2021-01-21 下午4.15.33.png


    1. Data preparation

    Create a new dataset ds1, write the SQL query statement select * from orders 

    Create a new dataset ds2, write the SQL query statement select * from ordersdetail


    2. Report design

    Design the report as shown:

    截屏2021-01-21 下午4.42.42.png

    Select cells B4, D4, and under cell attributes > style, set the date to the format of month, year and day.

    Select cells B7,D7, and set to number.

    Select cell D12 and insert formula =B12*C12  to calculate the sales volume


    3. Linkage setting

    Select cell A12 and add data filtering conditions to establish the relationship between ds1 and ds2.

    Select and double-click cell A12, select filter. Add a common condition to the cell to bind the "order ID" field of DS2 and the "order ID" field of DS1 to realize the association between the two datasets.

    截屏2021-01-21 下午4.53.05.png


    4. Pagination setting

    In order to display the "order information table" and "order details table" corresponding to each expanded order ID by page, it is necessary to set the page after line.

    Select cell A1, select cell attributes > other > pagination in the right property panel, and check paginate before row.

    截屏2021-01-21 下午4.54.53.png


    5. Effect preview

    1) PC

    Save the report, clickPagination Preview, the effect is as shown below:

    9.png

    2) Mobile terminal

    For the way to view the report on the mobile terminal, please refer  to the Mobile terminal preview of the report .

    Both App and HTML5 are supported, and the effect is shown in the following figure:

    8.png

    III. Template download

    Completed template, please refer to %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\MasterSubReport.cpt

    Click download template: 

    MasterSubReport.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