JS Report automatic carousel

  • Last update:  2020-12-15
  • I. Overview

    1.1 Problem

    In actual work, it is necessary to realize the automatic carousel effect of multiple reports, but it is different from the Automatic page turning and manual switching of charts. The actual effect is shown in the figure below:   


    1.gif


    1.2 Solution

    Using the JavaScript delay function: after the report is loaded, it stays for a certain time and automatically jumps to another report to achieve automatic carousel special effects. 

    II. Example

    2.1 Add event

    Open the template GettingStartedEN_1.cpt, click Template>Template Web Attributes>Pagination Preview Settings in the designer menu bar , select "individually set for the template", and add the loading end event, as shown in the following figure: 

    2.png

    setTimeout(function(){
        window.location="${servletURL}?viewlet=GettingStartedEN_2.cpt";
    },3000)

    Follow the above steps, continue to add the loading end event and JavaScript code for the GettingStartedEN_2.cpt, the code is as follows:

    setTimeout(function(){
        window.location="${servletURL}?viewlet=GettingStartedEN_1.cpt";
    },3000)

    2.2 Preview effect

    Save the template, click any template pagination preview , and the report will be switched every 3 seconds. The effect is shown in the figure below:

    3.gif

    III. Download template

    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