I. Overview
1) FineReport allows you to insert formulus into cells to achieve more complex and variable report effects.
2) Compared to Excel, FineReport provides rich built-in functions.
| You will learn |
|---|
|
II. Steps
There are 3 ways to insert a formula.
1. Method 1
In the right-hand pane, click the drop-down box and select [Insert Formula]

2. Method 2
In the upper toolbar, click Insert->Cell Element->Insert Formula.

3. Method 3
In the upper toolbar, click the formula icon

4. Formula Definition Window
1) Formulas can be constructed by constants, variables, operators and functions.
Constant:Number, string, etc.
Variable:Parameters, cells, widgets, etc. For the use of parameters, please refer to Global Parameters and Template Parameters and Dataset Parameters.
Operator:Arithmatic operators, logical operators, comparison operators, etc.
Function:FineReport provides abundant built-in functions.
2) When you enter a formula in the input box, other regions in the window will react accordingly to help you quickly find out the exact built-in function.

5. The built-in functions support fuzzy search
Double-click the result to add the function to your formula.

6. Search for a built-in function based on function type
The lower-right region will describe the function prototype and usage scenarios.

7. Click the [Validity Checks] button to ensure the formula is legal

8. Simple Formula Example (1)
1) Create a title using a sring and a function
Insert a formula in B2.
Input: "Report of " + TODAY(). Click OK.

2) Broaden the cell, and the cell content begins with "=", indicating that its a formula. Preview.

3) The preview result shows the date when you make the report.

9. Simple Formula Example (2)
1) Create a dataset by DB query and drag table [Sales_Volume].

2) Drag data column [Sales_Volume] to B2.

3) Insert a formula in C2. Input: B2 - 100. Click OK.

4) Preview. A new column of data is created next to the original data column.

10. Simple Formula Example (3)
1) Create a dataset by DB query and drag table [Sales_Volume].

2) Drag data column [Sales_Volume] to B2.

3) Insert a formula in B1. Input: SUM(B2). Change the font color of B1 to red.

4) Preview. A summation appears above the data column.

11. Simple Formula Example (4)
1) Create a dataset by DB query and drag table [Sales_Volume].

2) Drag data column [Sales_Volume] to B2.

3) insert a formula in C2. Input: B2 > 200. Click OK and make the content in B2 and C3 align center.

4) Preview. The comparison results appear on the right of the data column.
