Scrolling the Report to the Bottom and Rightmost Side Automatically

  • Last update:July 11, 2025
  • Overview

    Expected Effect

    When you select Pagination Preview or Data Entry Preview for general reports, the report page may be relatively large due to the lack of pagination.

    Sometimes, to view or enter the latest data conveniently, you need to scroll the report to the bottom and the rightmost side of the browser automatically after page loading, as shown in the following figure.

    Implementation Method

    To realize the effect, you can add a Loading End event to adjust the scrollbar positions upon report initialization.

    Notes

    1. This solution is only supported in general reports.

    2. This solution is not supported in reports with frozen rows and columns. Otherwise, the solution does not take effect.

    3. The Custom Scrollbar plugin is not supported in the solution. Otherwise, the solution does not take effect.

    Example

    Template Preparation

    1. Download the template Clicking the Button to Submit the Data into the Database.cpt.

    Open the template and design the template style, as shown in the following figure.

    2. Modify the SQL statement of the dataset ds1 to SELECT * FROM Product.

    Adding a Loading End Event

    Choose Template > Web Attribute > Data Entry Setting, select Set for This Template Separately in Following Settings, and add a Loading End event in Event Setting, as shown in the following figure.

    The JavaScript code is as follows.

    setTimeout(function(){
      var y=contentPane.$contentPane[0].scrollHeight;//Obtain the maximum height of the page.
      var y=contentPane.$contentPane[0].scrollHeight;//Obtain the maximum width of the page.
      contentPane.$contentPane.scrollLeft(x);//Set the leftmost position the scrollbar can reach.
      contentPane.$contentPane.scrollTop(y);//Set the top position the scrollbar can reach.
    },100)
    iconNote:

    1. Since the page may not be fully initialized after page loading, you can use the delay function setTimeout(), which provides better compatibility.

    2. The JS code is not supported in reports with multiple sheets.

    Effect Display

    Save the template and click Data Entry Preview. The following figure shows the preview effect on the PC.

    iconNote:

    1. If the desktop resolution is relatively high, the effect may not be visible. In this case, you can reduce the browser window size and refresh the page to see the effect.

    2. The effect cannot be previewed on mobile terminals.

    Template Download

    Attachment List


    Theme: Data Entry
    • 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