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