Two small examples of the development of Finereport Mobile report two times

Source: Internet
Author: User

Example 1: Refresh Page 1. Problem description

A hyperlink to B to fill in, b after the data returned a, a automatically refresh the display of new data.

2. Solution

1. Contentpane.setappearrefresh (); Add JS to the event after the load of a has ended

3. Example

3.1 Open a report

%fr_home%\webreport\web-inf\reportlets\doc\advanced\mobile-client\ DETAILEDDRILLA.CPT

%fr_home%\webreport\web-inf\reportlets\doc\advanced\mobile-client\ DETAILEDDRILLB.CPT

3.2 Add JS

Add post-load events to the template detaileddrilla.cpt, such as:

The specific JS is as follows:

1. Contentpane.setappearrefresh ();

3.3 Save and preview

Save the template and view the report on the mobile end to see the effect. How to set up the mobile side see Add server and Report view.

Example 2: Get the form chart and Refresh 1. Problem description

Chart0 Linkage REPORT0 Report block, change the report block data, Chart1 data from the report block, Linkage report block, Chart1 is not automatically refreshed;

2. Solution

Use JS to delay the refresh of chart data

Get Chart object: Var c=fr. Chart.WebUtils.getChart ("Chart1");

Chart Data refresh: C.datarefresh ();

Delay function: setTimeout (function () {}, 500);

3. Example

3.1 Open a report

%fr_home%\webreport\web-inf\reportlets\doc\advanced\mobile-client\ chartdelayrefresh_1.frm

3.2 Add JS

Chart0 Linkage REPORT0 report block, click Chart0, change the data in the Report0, Chart1 data from Report0; Now click on the Chart0,chart1 chart will not be refreshed;

Add a hyperlink to Report0 as shown in:

The specific JS is as follows:

1. SetTimeout (function () {

2. var c=fr. Chart.WebUtils.getChart ("Chart1");

3. C.datarefresh ()

4.}, 500);

3.3 Save and preview

Save the template and view the report on the mobile end to see the effect. How to set up the mobile side see Add server and Report view.

Two small examples of the development of Finereport Mobile report two times

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.