Component Variables

Component variables are temporary, named data storage areas for a component. They are available to all ProcScript in the component.

You can use a component variable:

  • To store the results of aggregate calculations (such as running totals) before assigning the results to a field.
  • To maintain status flags.
  • As a temporary counter, for use during the component session.
  • To transfer data into break, header, and footer frames when printing.

You can only use a component variable in the component for which it is defined. Use operation parameters or global variables to transfer data between components.

Defining Component Variables

To define a component variable, declare it in a variables block in the Declarations container of the component. For more information, see variables.

For example:

; Declarations container of component
variables 
  string vString
  numeric DIS(999P99) myNumber
endvariables

Referencing Component Variables

To reference component variables in ProcScript, use the format: $VariableName$. For example:

if ($myNumber$ <= 123)
  ;... do something
endif

Related Topics