FineReport how to customize the parameter interface

  
In the finereport you can use a custom way to implement the conditional form interface, so you can not use the built-in parameters in finereport. The following small series will introduce you to the finereport how to customize the parameter interface. We use the html page as an example to illustrate, the final effect is as follows: open the template %FR_HOME%WebReport\\WEB-INF\ eportlets\\demo\\parameter\ umber.cpt to switch to the parameters Interface, in the upper left corner of the settings button, remove the display parameter form and click the query before the query does not display the report content before the two options, save the following template as %FR_HOME%WebReport\\WEB-INF\ eportlets\\demo\\parameter\\ The number1.cpt custom form interface is different from the framework used in the actual system. The type and definition of the control are different. Therefore, the form query interface in the above figure is not introduced. The user implements it by itself. This example uses the simplest html element. The main attention is the action address of the form form and the position of the form submission result display; if the form is defined in this example, no action is specified, and the target value is the iframe name of the embedded report. In addition, we need to get the control value when clicking the query button, and need to do cjkEncode, so the query button type uses button, do not use submit (directly trigger action). When the form submit event clicks "query" button, autoSubmit() is triggered. In this method, the value of the form control is obtained by js, the complete report access path is spliced, and the final url is cjkEncode encoded. The final report url is assigned to the action of the form, and the commit is triggered, and the returned report result will be displayed in the specified iframe. Note: You need to introduce the cjkEncode source code or finereport.js to use the cjkEncode method. For details, see the Web Passing Chinese Parameter Document. Sample complete code completed page view %FR_HOME%\\WebReport| Page_demo\\parameter.htmlThis article is from [System Home] www.xp85.com
Copyright © Windows knowledge All Rights Reserved