I.Description
1. Expected effect
Our built-in query interface needs to click the query button to query the data. The user feels that this is too troublesome. They hope to query the results directly after entering the parameters, without clicking the query button, so how to achieve it?
Or re-trigger the query after filling in the report successfully and display the latest data. The effect is as follows:
2. Ideas
Users can add JS scripts to the template:
_g().parameterCommit();
to trigger query events.
II. Examples
1. Prepare template
Open the template:%FR_HOME%\webroot\WEB-INF\reportlets\GettingStartedEN.cpt
The original parameter interface is as follows, select Query button and delete:
Click to download the template:
2. Trigger query event
Click the Drop-down Box Control in the parameter area, select the Event Panel below the property sheet, and click to Add An Event After Editing:
3. Effect preview
Click the Pagination Preview and select a value to automatically query it. The effect is shown insection I
App and HTML5 effects are shown in the figure below:
III. Download Template
The completed template can be found in:
%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\JS\JS_Implementation_can_Automatically_Query_without_Clicking_the_Query_Button.cpt
Click to download the template:
JS_Implementation_can_Automatically_Query_without_Clicking_the_Query_Button.cpt