Parameter Field Type Descriptions
You can define seven types of parameter fields. The following example of a parameter form shows each of the seven parameter field types.
Parameter field type | Example |
---|---|
Field Parameter | Company |
Range Parameter | Employees |
Task Parameter | Report Option |
Order Parameter | Report Order |
Optional Summary Parameter | Summary |
Record Selection Parameter | Report Select |
Condition Parameter | Age |
Parameter Definition
Company ZZZZ
Employees ZZZZZ - ZZZZZ
Report Option X A - Short Listing (Name, Address, Phone, etc.)
B - Long ListingB
Report Order X 1 - By Last Name
2 - By Employee Number
3 - By Job Code and Employee Number
Summary X (Y or N)
Report Select X I - In State Employees
O - Out of State Employees
Age ZZ
Field Parameter
A field parameter tells the program which records to process based on the value of a field in the record. The value you type in a field parameter must match the value of the same field in a record or the program does not process that record. In the Parameter Definition example, Company is a field parameter. If you type "1" in the Company field, the program processes only records whose Company field has a value of "1".
Range Parameter
A range parameter is similar to a field parameter. In a range parameter, however, you can type a range of values rather than a single value. The value of a field must be within the range of values you type in the range parameter field or the program does not process that record. In the Parameter Definition example, Employee is a range parameter. If you type 100 in the first Employee field and 800 in the second Employee field, the program processes only records whose Employee number is from 100 to 800.
Task Parameter
If a program has multiple reports (tasks), you must also define a task parameter to tell the program which report to run. In the Parameter Definition example, Report Option is a task parameter. This program has two reports. If you type "A" in the Report Option field, the program prints the short listing. If you type "B", the program prints the long listing.
Order Parameter
If you defined more than one access order for a report, you must also define an order parameter field for that report. The order parameter tells the program which access order to use when running the report. In the Parameter Definition example, Report Order is an order parameter. This report has three access orders. If you type "1" in the Report Order field, the program prints employees in Last Name order. If you type "2," the program prints employees in Employee Number order. If you type "3," the program prints employees in Job Code and Employee Number order.
Optional Summary Parameter
If you defined an optional summary for a report, you must also define an optional summary parameter. An optional summary parameter tells the program whether to run the summary or nonsummary report format. In the Parameter Definition example, Summary is an optional summary parameter. If you type "Y" in the Summary field, the program prints the summary format. If you type "N," the program prints the non-summary format.
Record Selection Parameter
If you defined one or more record selection conditions for a report, you must also define a record selection parameter. A record selection parameter tells the program which selection criteria to use when running the report.
You can choose only one of the record selection conditions defined for the report when you run it. Therefore, you only need to paint one record selection parameter field on a parameter form. For information on record selection conditions, see Defining a Report Record Selection.
In the Parameter Definition example, Record Select is a record selection parameter. If you type I in the Record Select field, the program prints only employees who live in-state. If you type "O," the program prints only out-of-state employees.
Condition Parameter
If the program uses a parameter field in a condition, you must define a condition parameter. The condition uses the value you type in the condition parameter field to determine if a record satisfies the condition.
In the Parameter Definition example, Age is a condition parameter. The
program uses the condition Where Employee.Age < Param: Age
. The
condition uses the value typed in the Age parameter field and checks the Employee.Age
against that value. For example, if you type 65 in the Age parameter field, the report would
access only employees whose age is less than 65.