Add a function field for a constant to a report
If you use a specific constant value, you can add a variable that contains this value. You can use this function field in other fields. This means you define the value of the constant only once and then reuse it again and again, for example in calculations.
To add a function field to a report:
- Add a function field.
- Select Constant value in Kind.
- Select the type. In order to use the constant in calculations, always select the Numerical or Decimal type.
- Enter the value.
- Click on: OK.
Example:
Your report contains the 'Yearly turnover' data field.
For every year, you want to determine the difference with the target turnover of 100.000. That is why you use the 'Reference value' constant and specify 100000 as the value.
To determine the difference you use the 'Difference' function field that has the following formula:
DecSubstr({Reference value},{Line amount})
Directly to |