The syntax of the formula edit box of the FineReport web report tool

Source: Internet
Author: User

The syntax of the formula edit box of the FineReport web report tool

FINEREPORT uses many formulas, including cells (the cells starting with = are parsed as formulas), condition display, data dictionary, report attribute value definition, chart title, and axis definition, you can write formulas for the content of the header and footer, and even the mouse suspension prompts in other cell attributes, although the editing box is very different.

To put it simply, pay attention to the following aspects of the formula:

1. the syntax of the if statement is strange. if (conditional sub-statement, value 1, value 2), if can be nested, if (conditional sub-1, value 1, if (conditional sub-2, value 2, value 3 )).

2. The switch statement is also true. I will not talk about the specific function.

3. Single and Double equal signs can be used for judgment.

4. single quotation marks and double quotation marks are used for strings.

4.1bool is only true or false. And logic or & or logic or |.

4.2 if it is null, isnull () is used ().

4.3format formula. The format formula is flexible. Format ($, "0.00") can convert the number of the current cell into two decimal places, or format (12, "budget value: 0 thousand Yuan ") change 12 to a budget value of 0.12 million RMB. Is this similar to the custom display data dictionary. Note that the full-digit year, month, and day style is "yyyy-MM-dd" instead of "yyyy-mm-dd". The lower-case mm means minute (minute ).

5. If you use A1 or b2 to retrieve cells in the formula, the syntax for cross-sheet value is sheet1! A1. these documents are available.

6. SQL function. This is the method for directly calling the database in the formula.

7. dataset formula.

A dataset formula directly calls a dataset using a formula. This formula does not show up (there are several scattered functions related to datasets). Let me talk about it.

For example, if you have a template dataset ds1 with the fields of region, salesperson, and sales volume, you can use ds1.group (region) to obtain the region field of ds1. group is a group, so that you can easily know that select is a list, ds1.select (salesperson) is a list to obtain the salesperson field. You can add restrictions. For example, ds1.select (salesperson, sales volume = 111) is a set of salespeople who obtain sales volume of 111.

Several functions related to datasets include colcount colname row rowcount.

 

8. Hierarchical coordinates.

Hierarchical coordinates are difficult in the formula. They are "playability" and have many things. They can only remember the most common ones and can solve various BT needs. A commonly used ranking formula = count (B3 [! 0] {B3> $ B3}) + 1. Let's see for yourself. Http://www.finereporthelp.com/help/1/4/7.html

9. Filter formula.

Filtering has two condition types: one is the formula condition. This formula is slightly different. You can directly write any field in the dataset where the field of the current cell is located, which is much more flexible than the common formula. Take the self-built sales table as an example to filter the cells where the region field is located. The formula conditions can be written directly: sales volume = 111.

10. condition attributes.

The condition attribute is not about the formula. It is natural to use more, but it is not easy to understand when it comes to contact. To put it simply. The Condition Property panel is a property, and the following is a condition. When the current condition is met, that is, when the return value is true, the above attribute settings are executed.

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.