Version
Version | Functional Change |
---|---|
11.0 | Difference from 10.0:
|
11.0.7 | Supported the duchamp API in FVS visualization dashboards for FineReport with the FineVis Data Visualization plugin of V1.8.0 and later versions. |
Global APIs allow you to manipulate the entire report. The APIs and attributes of other elements in the report are inherited from the global APIs.
To access and operate other elements in the report, you must first use a global API to obtain the report object.
Before API use, read JS API Compatibility Description carefully. APIs are supported in both general reports and dashboards (new version) by default.
_g()
API | _g() | To obtain the report object, which allows you to use this API in conjunction with the APIs and attributes of the report object. If multiple sheets exist in Data Entry Preview, the obtained object is the table object in the currently selected sheet. |
Parameter | - | - |
Returned Value | object | Report object |
Example | Example 1: You can obtain the parameter panel object after obtaining the report object.
Example 2: You can obtain the report block object named report0 after obtaining the report object.
Example 3: You can submit the parameter value to requery the report using the parameterCommit API after obtaining the report object. _g().parameterCommit(); | |
Application Example | You can query the report after selecting the value from the drop-down list without clicking the query button, as shown in the following figure. For details, you can download the template Automatic Query Without Clicking the Query Button by JS.cpt. | |
Mobile Terminal | This API is supported on mobile terminals. |
_g().getParameterContainer();
API | _g().getParameterContainer(); | To obtain the parameter panel object, which allows you to use this API in conjunction with the APIs for the parameter panel. |
Parameter | - | - |
Returned Value | object | Parameter panel object |
Example | Example 1: You can obtain the parameter panel after obtaining the report object.
Example 2: You can obtain the drop-down box widget named comboBox0 on the parameter panel after obtaining the parameter panel object. _g().getParameterContainer().getWidgetByName("comboBox0"); | |
Application Example | You can assign values to widgets on the parameter panel, as shown in the following figure. For details, you can download the template Value Assignment to a Widget on the Parameter Panel.cpt. | |
Mobile Terminal | This API is supported on mobile terminals. |
parameterCommit

API | parameterCommit(); | To submit the parameter value and requery the report, triggering a report refresh. |
Parameter | - | - |
Returned Value | void | |
Example | You can submit the parameter value and requery the report after obtaining the report object. _g().parameterCommit(); | |
Application Example | You can query the report after selecting the value from the drop-down list without clicking the query button, as shown in the following figure. For details, you can download the template Automatic Query Without Clicking the Query Button by JS.cpt. | |
Mobile Terminal | This API is supported on mobile terminals. |
loadContentPane
API | loadContentPane() | To reload and refresh the page without submitting the parameter value. |
Parameter | - | - |
Returned Value | void | |
Example | You can refresh the page after obtaining the report object. _g().loadContentPane(); | |
Application Example | You can click the button to refresh the report, as shown in the following figure. For details, you can download the template Report Refresh by Clicking the Button.cpt. | |
Mobile Terminal | This API is supported on mobile terminals. |
getPreviewType
API | getPreviewType() | To obtain the current preview mode of a report. |
Parameter | - | - |
Returned Value | string | String, which represents the current preview mode.
|
Example | The API can return the current preview mode of the obtained report object. _g().getPreviewType(); | |
Application Example | You can design a pop-up box to appear when Data Analysis Preview is not supported in certain reports. For details, you can download the template Report Preview Mode.cpt. | |
Mobile Terminal | This API is supported on mobile terminals. |
duchamp
API | duchamp |
|
Parameter | - | - |
Returned Value | object | FVS Component object |
Example | Example 1: You can obtain the table component and enable the marquee effect.
Example 2: You can obtain the component object and hide the component with one click. duchamp.getWidgetByName("Component name").setVisible(false); | |
Application Example | - | |
Mobile Terminal | This API is not supported on mobile terminals. |