Add function fields to reports
This topic is a general introduction to the formula editor.
In the formula editor you determine the following:
- The name and internal code code of the function field
- The type of the function field
- The formula (calculation)
- The output (for example, text, numerical value, decimal value, Y/N).
In the formula editor fields are always between {curly brackets}.
Functievelden toevoegen aan rapporten:
- Open the report layout.
- Click on: .
- Go to the tab: Function fields.
You can add, change or delete function fields here.
- Click on: (add function field)
- Enter the Code and the Name. Usually it is easiest to use the same value for the code and the name.
- Select Kind:
- Constant value
A value that always stays the same. You can position it on the report or use it in calculations that include other function fields.
- Text block
You combine texts (that you enter yourself) with fields. This is the easiest way to combine text and fields, for example like "Your credit limit is {credit limit} euro". However, you cannot use conditions or calculations.
- Expression
A calculation or comparison.
- Constant value
- Select Text as the type.
This determines how the result of the operation will be shown.
- Enter the operation and drag the required fields to the box with the operation.
- Click on: OK.
Profit shows the new field in the Function fields box. You can drag this field to the layout and format it.
- Select the appropriate tab:
Add data fields from the data collection.
Add a function field (you can use a function field within another function field).
Add a document field (report name, print date, etc.).
Add a script field (calculation functions, field formatting, etc.).
- Drag the necessary fields to the editing box.
By default, Profit displays field names, but you can also display the (internal) codes by selecting Codes.
- Click on: the Check button. Profit checks if the formula is technically correct. This does not mean that the formula gives the correct result.
- Click on: OK. if Profit reports that the script does not contain errors. If an error has been detected, first resolve the error.
- Click on: OK.
Profit shows the new field on the Function fields tab.
Drag the field to the layout, just like you would do with other fields.
Directly to |