Successfully!

Error!

JS Auto Refresh of Dashboard

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

    1.1 Requirement

    If the FineReport App is installed at the TV client and a report or a decision-making report is displayed on a large screen, how to refresh the report by setting JS timing?


    1.2 Solution

    Support JS timing and cancel JS timing:

    setInterval('location.reload();',10000);// Time is measured in ms, namely, the page is refreshed every 10s.

    Cancel JS timing:

    var timer = setInterval('location.reload();',10000);clearInterval(timer);// Cancel JS timing. 

    II. Sample

    2.1 Design and open the template of decision-making report

    The decision-making report is designed as follows:


    2.2 Add an After Initialization event

    In the Widget Setting pane, select [body] and add an [After Initialization] event, as shown below:

    Input the JS code:

    setInterval('location.reload();', 3000); //Time is measured in ms, namely, the page is refreshed every 30s.

     

    2.3 Preview

    Save the templates and select [Dashboard Preview]. The preview effect is as shown below:

    III. Download the template

    Attachment List


    Theme: Dashboard
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback