Show Fixed Number of Row Per Page

  • Last update:  2021-02-04
  • I. Overview

    1. Expected effect

    When making a pagination report, you want the report to display a fixed number of rows per page, as shown in the following figure:

    1.png


    2. Implementation method

    This is achieved by adding conditional formatting to the most parent case. The most parent cell refers to the parent cell of the highest level in the report. For example, cell A1 is the parent cell of cell A2, and cell A2 is the parent cell of cell A3. Cell A1 is the most parent cell.

    Note: when the data in a group is less than the number of rows set, only the remaining data in the group will be displayed.


    II. Example1: fixed number of rows

    1. Report Design

    Design the report as shown in the following figure. 

    2.png


    2. Set fixed number of rows

    Select cell A5, add conditional formatting, and select pagination > paginate after row. Select formula for formula condition type, and click define button to input formula: &A4 % 5 = 0.

    &A4 is the serial number of the data in the cell. This condition means that when the serial number is an integral multiple of 5, the line will be paginated, that is, every 5 lines will be paginated. The steps are as follows:

    3.png

    Note: the condition property must be set on the most parent cell, which is not necessarily the first cell in the row.


    3. Effect preview

    Save the template and click pagination preview. Both app and HTML5 support it, and the preview effect is similar. The effect is the same as expected in Section I.1.


    III. Example2: Dynamic number of rows

    The first example is the fixed number of rows per page, and the next example is the dynamic display of rows per page in each group (10/20/30/40).

    1. Report Design

    The report design is the same as example1, you can refer to the figure under II.1.


    2. Add widget

    1) Edit the parameter pane and add a label widget. The value of the widget is set to number of rows, as shown in the following figure

    4.png

    2) Add a drop-down box widget, set the data dictionary type to custom, and add a value, as shown in the following figure:

    5.png

    3) Click predefined widget to display the query button and add it to the parameter pane, as shown in the figure below:

    6.png


    3. Set dynamic number of rows

    Select cell A5, add conditional formatting, and select pagination > paginate after row. Select formula for formula condition type, and click define button to enter formula: &A4 % $PageSize = 0.

    &A4 is the serial number of the cell data, and $PageSize is the value of the drop-down box. This condition indicates that when the serial number is an integral multiple of $PageSize, the line is paginated, that is, every $PageSize line is paginated. The steps are as follows:

    7.png

    Note: the condition property must be set on the most parent cell, which is not necessarily the first cell in the row.


    4. Effect preview

    PC terminal

    Save the template and click pagination preview. Both app and HTML5 support it, and the preview effect is similar. The effect is as follows:

    9.gif


    IV. Template download

    1. Example1: fixed number of rows

    For completed templates, please refer to:

    %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\FixRowPerPage.cpt

    Click to download the template:

    FixRowPerPage.cpt

    2. Example2: dynamic number of rows

    For completed templates, please refer to:

    %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\DynRowPerPage.cpt

    Click to download the template:

    DynRowPerPage.cpt

    V. Precautions

    1. Fixed row limit

    1) In pagination preview, if the table in the template adaptive attributes setting is "horizontally adaptive or not adaptive", then the table will be displayed in pagination when the number of rows exceeds the page size. If not, please refer to the document: horizontally non pagination.

    2) There is a certain limit on the number of rows displayed without pagination. When the table is "horizontal adaptive or non adaptive", the maximum number of rows displayed is 1016. When the table is "bidirectional adaptive", the maximum number of rows displayed is 2561.

    3) When "freeze row" is set, the row height is limited, and bidirectional adaptation does not take effect, which is equivalent to "lateral adaptation or non adaptation".


    2. invalid column grouping table

    When the table is displayed in the form of column grouping, the fixed number of rows pagination set is invalid. You can change the data setting to "list". 

    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