Crystal Reports  

Crystal Syntax for Custom Functions

Crystal syntax custom functions are expression oriented, like Crystal syntax formulas. You can use either syntax formats listed below.

Function ([argList])

expressions

Function ([argList])

(

expressions

)

argList Syntax

Optional. A list of variables representing arguments that are passed into the function when it is called. Multiple variables are separated by commas. An empty argList is allowed; however, the parentheses surrounding argList are not optional and must be used even when argList is empty.

[Optional] simpleType [Range] [Array] varName [:=defaultValue]

Scope

Variable declarations within a custom function are local scope by default. This contrasts with variable declarations in Crystal syntax formulas, where global scope is the default.

See Also

Custom Function Syntax Rules | Custom Function Evaluation Time