Data Field Functions
You use data field functions to perform operations on data fields. They either have one parameter, (Field), or two parameters, (Field,Group). Database functions with the (Field) parameter perform the operation on the defined data field for all report records. The data field to use for the (Field) parameter is selected on the Data Fields page, which is described in Data Fields Page. Database functions with the (Field,Group) parameters perform the operation on the defined field for only report records in the defined group. The Group parameter is the integer assigned to the Group Header. The group to use when this parameter is required is selected on the Groups page, which is described in Groups Page.
One-parameter database functions are most meaningful when placed in the Report Header or Report Footer of a Report Design file. Two-parameter database functions are most meaningful when placed in a Group Header or Group Footer of a Report Design file. The format for the Field parameter is the field name (prompt) followed by the table name. The icon for the table precedes the Field parameter.
Although you can use any field type as the (Field) parameter for some data field functions, such as CountDistinctField or CountField, you can use only numeric fields as the (Field) parameter for other data field functions, such as AvgField, SumField, and VarField. If you use an incorrect data field type for a database function, an error message displays during generation of the report.
The following table describes the predefined data field functions that can be performed on the defined data field. When using only the report records for a particular group in the formula, select the two-parameter version of the function (Field,Group) and then the appropriate group on the Groups page.
Function
Description
AvgField(Field) or AvgField(Field,Group)
Average value
CountDistinctField(Field) or CountDistinctField(Field,Group)
Count of distinct values
CountField(Field) or CountField(Field,Group)
Count of each record that has data in the field
MaxField(Field) or MaxField(Field,Group)
Maximum value
MinField(Field) or MinField(Field,Group)
Minimum value
StdField(Field) or StdField(Field,Group)
Standard deviation
StdpField(Field) or StdpField(Field,Group)
Standard deviation for the population
SumField(Field) or SumField(Field,Group)
Sum of all values
ValueField(Field)
Value for the field.
* 
This function can have only one parameter, (Field). It is most meaningful when placed in the Details section of a Report Design file. When used alone, this function is simply the same as including the field in the report; however, if this field’s value is used within a more complex calculation, this function becomes very valuable. For example, you may want to add together the values of two fields or use this value as a parameter to another function.
VarField(Field) or VarField(Field,Group)
Variance
VarpField(Field) or VarpField(Field,Group)
Variance for the population