4D v13.4

LISTBOX SET FOOTER CALCULATION

Home

 
4D v13.4
LISTBOX SET FOOTER CALCULATION

LISTBOX SET FOOTER CALCULATION 


 

LISTBOX SET FOOTER CALCULATION ( {* ;} object ; calculation ) 
Parameter Type   Description
Operator in If specified, object is an object name (string)
If omitted, object is a variable
object  Form object in Object name (if * is specified) or
Variable (if * is omitted)
calculation  Longint in Calculation for footer area

The LISTBOX SET FOOTER CALCULATION command sets the automatic calculation associated with the footer of the list box designated by the object and * parameters

If you pass the optional * parameter, this indicates that the object parameter is an object name (a string). If you do not pass this parameter, this indicates that the object is a variable. In this case, you pass a variable reference instead of a string.
The object parameter can designate:

  • the variable or name of a footer area. In this case, the command applies to this area.
  • the variable or name of a list box column. In this case, the command applies to the footer area of this column.
  • the variable or name of a list box. In this case, the command applies to all the footer areas of the list box.

In the calculation parameter, pass one of the following constants, found in the Listbox Footer Calculation theme, in order to set the calculation to be performed:

Constant Type Value Comment
Listbox footer average Longint 6 Used with number or time type columns
Default type of the result: Real
Listbox footer count Longint 5 Used with number, text, date, time, Boolean or picture type columns
Default type of the result: Longint
Listbox footer custom Longint 1 No calculation performed by 4D. The footer variable must be calculated by programming.
Default type of the result: Footer variable type
Listbox footer max Longint 3 Used with number, date, time or Boolean type columns
Default type of the result: Column array or field type
Listbox footer min Longint 2 Used with number, date, time or Boolean type columns
Default type of the result: Column array or field type
Listbox footer std deviation Longint 7 Used with number or time type columns (only for array type list boxes)
Default type of the result: Real
Listbox footer sum Longint 4 Used with number, time or Boolean type columns
Default type of the result: Column array or field type
Listbox footer sum squares Longint 9 Used with number or time type columns (only for array type list boxes)
Default type of the result: Real
Listbox footer variance Longint 8 Used with number or time type columns (only for array type list boxes)
Default type of the result: Real

Note that predefined calculations take all the values of the column into account, including those of any hidden rows. If you want to restrict a calculation to only visible rows, you must use the Listbox footer custom constant and perform a customized calculation. 

If the data type of a column or of even one column of the list box (when object designate a whole list box) is not compatible with the calculation set, the footer is not modified and the error 18 is generated. If a column contains a formula (selection type list box), the error 10 is generated.

Note: Footer area variables are typed automatically (when there are not typed through the code) with regards to the calculation set in the Property List (see Specific properties of List box footers). If the variable data type does not correspond to the result expected by the LISTBOX SET FOOTER CALCULATION command, a typing error is generated. For example, for a column displaying dates, if the footer calculation is 'Maximum', the footer variable will be typed as Date. At this point, if you execute the statement LISTBOX SET FOOTER CALCULATION(footer;Listbox footer count), an error is generated because the expected data type of the result (longint) differs from the actual variable data type.

 
PROPERTIES 

Product: 4D
Theme: List Box
Number: 1140

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Created: 4D v13

 
SEE ALSO 

LISTBOX Get footer calculation