The Parameters component is an entry point into the Function, Report, and Process Procedures. Parameters are means by which Functions, Reports, and Processes communicate with the outside world. Parameters can be thought of as placeholders for Variables (either local or database fields) or Constants that will be passed to the Procedure at runtime.
Parameters pick the contents of the runtime variables at the Procedure's entry point (which is the Parameters component) and carry them inside the Procedure's body, where they can be used for calculations, searches, assignments, etc.
The following is an explanation of how to load a New Parameter, specify its data type, and give it a meaningful name:
Parameters are different from Variables
All variables used within a Procedure (whether user-defined, system or database
fields) are private to this Procedure. This means that their contents is not "visible" to
the world outside the Procedure; their names would not be recognized as legitimate
variables in the Procedure that called this Procedure at runtime.
Parameters can provide two-way communication with
the world.
If a Parameter is assigned a value in the Procedure e.g. through the Calculation
component,
then this Parameter is deemed to be a Parameter of the IN/OUT type. The value
assigned to the Parameter will become known to the Procedure (report
or another function) that called this Procedure at the runtime; it will be
placed into the Variable (known to the calling Procedure) at the end of the
Procedure's execution. Thus, the called Procedure can send data back to the
calling Procedure, if necessary. Parameters that are never assigned a value
in the
Procedure are known to the Procedure as of IN-only type; they provide one-way
communication from the caller to the Procedure.
Since variables that are passed through the Parameters component to the Procedure are defined outside the Procedure, their data types cannot be inferred from the context of the Procedure, as in the case of Local Variables. For this reason, the Parameters component provides the mechanism to explicitly set the Data Type of the Parameters through the pop-up list of standard data types; the user must decide what type of data each Parameter will carry. See the example below.
The following example shows a completed Parameter and its Legend Inspector view which is the counter part to the Function example shown under Function object.
Once defined in the Parameters component, parameters can be used in the function or report just like variables. Flow direction lines (arrows) cannot terminate on the Parameters component; it can only originate the connections.