Scope operators
Use the scope operator to declare the availability of variables in the report. If the scope operator is not specified then Global is used.
Usage:
The following scopes are available in Crystal syntax:
-
Global - Can be used in all formulas in the report. This is the default value, if no scope operator is specified.
-
Local - Only valid in the formula itself.
-
Shared - Can be used in all formulas in the main report and all sub-reports. These variables are shared between main and sub-reports.
Examples
// Formula "Initialize"
Global NumberVar x;
x := 0;
// Formula "Summarize"
Global NumberVar x;
x := x + 1;
// Formula "Print Value"
Global NumberVar x;
x;