Introduction to the JS edit box and URL address bar Syntax of FineReport
JS edit box:
1. FineReport js.
As a BS product, browser-side JavaScript is essential.
Js in FineReport has already called finereport. js.
As you know, when previewing a report, the report servlet will convert the cpt template to html. In this html head, the FineReport js will be introduced. This finereport. js contains many built-in functions and some public attributes. No matter in the template or other web pages, you only need to introduce finereport. js, you can use FR. the form of xxx calls public attributes and methods. The above is a passage from the FR official document. If you want to use a ready-made FineReport for your own web, you must first reference finereport. js.
2. Differences.
There are two types of js events: page-related status events and button-related events. There are three types of buttons: toolbar, parameter panel or form mode, and page filling. Some statements of Different buttons are slightly different.
The form is form, and the filling is write. Take obtaining the control and assigning values to the control as an example.
This. options. write. getWidgetByName ("p1"). setValue ("aaa"); // enter
This. options. form. getWidgetByName ("p1"). setValue ("aaa"); // form, parameter Interface
3. The js editing box calls the formula.
Put the formula in the frame "$.
For example, var v1 = "$ {len ('sdf ')}"; then v1 is 3.
This can be compared with the dataset definition and formula interaction. In js, "" The following is the string, and SQL is actually the string. The SQL definition is the formula in $, therefore, the "$ {}" in the JS editing box should be a formula.
However, it should be noted that there is no such simple analogy. After all, there is a difference in the processing method. The SQL side concatenates all the formula parameters in the report, then they are sent to the database to run, but JavaScript cannot be spliced in this simple way.
URL address bar
There are no syntax features here. In actual applications, it is not directly written in URLs. Most of them are used for embedding or redirecting. Let's briefly describe the parameters in the url.
The first is the op parameter. Document: http://www.finereporthelp.com/help/6/3/3.html
By default, a report is previewed by page. When the op parameter is write, the report is previewed. op = view is data analysis, and op = form is form mode.
Op = fs, data Decision Making System
Op = fr_platform, report platform management
Op = excel_submit
Op = auth_login. The intermediate logon page requires the fr_username and fr_password parameters.
Other parameters:
_ Bypagesize _: controls whether pages are displayed.
_ Pi _: whether to display the parameter Interface
_ Filename _: control the exported file name. If not, the Template Name is used by default.