Define the variables within a formula field:
Shared NumberVar x := 1000;
Shared NumberVar y;
Assigning the values is optional. To display the variable in a second formula later on in the report, the call is nearly identical:
Shared NumberVar x;
x