Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

JS Implementation can Automatically Query without Clicking the Query Button

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:

2021-01-26_16-48-23.gif


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: 

GettingStartedEN.cpt

1.png


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:

2.png


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:

2021-12-20_17-59-34.gif

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

Attachment List


Theme: Secondary Development
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback