Java report tool FineReport's JS edit box and URL address bar syntax introduction, finereportjs

Source: Internet
Author: User

Java report tool FineReport's JS edit box and URL address bar syntax introduction, finereportjs

 

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. See the document.

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.

Op = fr_adhoc & cmd = ac_init_analysispane & viewname = dataset name. Open the BS designer separately.

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.