The global interface is an interface that can operate the entire report. The methods and attributes of other elements in the report are inherited from the global interface. If you want to get other elements in the report and operate them, you must first use the global interface to get the report object.
_g()
Method | _g() | Get the report object, and use it in combination with the methods and attributes of the report object. |
---|---|---|
Parameter | - | - |
Return value | object | report object |
Example | Example 1: After obtaining the report object, use the method of the report object to obtain the parameter pane object Example 2: After obtaining the report object, use the method of the report object to obtain the report0 report block object
Example 3: After obtaining the report object, use the parameterCommit method of the report object to submit parameters and re-query _g().parameterCommit(); | |
Application example | After selecting the value from the drop-down box in the parameter pane, you can query without clicking the query button, as shown in the following figure: For detailed implementation methods, please refer to: JS implements automatic query without clicking the query button | |
Mobile | Support mobile terminal |
getParameterContainer
Method | getParameterContainer() | Get the parameter pane object in the report, and use it in combination with the parameter panel interface |
---|---|---|
Parameter | - | - |
Return value | object | parameter pane object |
Example | Example 1: If the obtained report object is defined as report, obtain the parameter pane object in the report Example 2: After obtaining the report object, then get the parameter pane object Example 3: After obtaining the parameter pane object, use its method to obtain the "drop-down box" widget comboBox0 on the parameter pane _g().getParameterContainer().getWidgetByName("comboBox0"); | |
Application example | Assign values to the widget on the parameter pane, as shown in the following figure: Click to download the template: | |
Mobile | Support mobile terminal |
parameterCommit
Method | parameterCommit() | After submitting the parameters, re-query and refresh the report |
---|---|---|
Parameter | - | - |
Return value | void | |
Example | Example 1: If the obtained report object is defined as report, submit the parameters and re-query Example 2: After obtaining the report object, submit the parameters to re-query _g().parameterCommit(); | |
Application example | After selecting the value from the drop-down box in the parameter pane, you can query without clicking the query button, as shown in the following figure: For detailed implementation methods, please refer to: JS implements automatic query without clicking the query button | |
Mobile | Support mobile terminal |
loadContentPane
Method | loadContentPane() | Reload, refresh report |
---|---|---|
Parameter | - | - |
Return value | void | |
Example | Example 1: If the obtained report object is defined as report, refresh the report Example 2: After obtaining the report object, refresh the report _g().loadContentPane(); | |
Application example | Click the button to reload the report, as shown below: Click to download template: | |
Mobile | Support mobile terminal |
getPreviewType
Method | getPreviewType() | Get the preview mode the report is currently in |
---|---|---|
Parameter | - | - |
Return value | string | String, the current preview mode:
|
Example | Example 1: If the obtained report object is defined as report, return the current preview mode of the report Example 2: Return the current preview mode of the report object _g().getPreviewType(); | |
Application example | When some report functions designed do not support the preview mode of "Data Analysis", a pop-up window reminds: Click to download the template: | |
Mobile | Support mobile terminal |