Creating custom functions
Custom functions are functions that you create yourself. You can do this in the report properties. In the menu, open Report, Properties.
Sometimes the Report menu is not displayed, because it depends on what you have selected in the report. If so, simply click on the report body and the report menu will appear again. Or, you can immediately right-click on the report body and select Report Properties from the dropdown, as in the following screenshot:
You will notice a Code tab, in which there are already some custom functions defined:
The following functions feature in this report:
BlankZero
BlankPos
BlankZeroAndPos
BlankNeg
BlankNegAndZero
To call a custom function from within an expression, you need to use this syntax:
=Code.NameOfFunction(Parameters,…)
Note
Note that we use a dot (.
) instead of an exclamation mark (!
). The exclamation mark is referred to as the bang operator. The difference between the two is simply that the dot is early-bound and the bang is late...