borland Packages  Class Hierarchy  dx.dataset Package 

CalcType interface

com.borland.dx.dataset.CalcType

About the CalcType interface

Variables  

The CalcType interface defines the types of calculations that a Column may involve: no calculations, a calculated value, an aggregate value, or a lookup. Use the constants defined in this class with the calcType property of a Column component.

When you set the calcType property to AGGREGATE, you must also set the associated aggregation properties in the AggDescriptor object. These properties indicate the Columm to perform the aggregation on, subtotal grouping, and the type of aggregator operation (sum, count, minimum value or maximum value).

When working with calculated fields, set the Column component's calcType property to CALC, then set the code for the calculation in the Column component's calcFields event handler. The calcFields event handler method is called for calculated columns whenever a field value is set and whenever a row is posted.

When working with lookup fields, set the Column component's calcType property to LOOKUP and its pickList property to a PickListDescriptor which describes the lookup relationship. In particular, the PickListDescriptor property of LookupDisplayColumn must be set to the Column to display the lookup values.


CalcType variables

Variables defined in this interface


CalcType variables

AGGREGATE

  public static final int AGGREGATE = 2
Constant used to designate a calculated field that summarizes across multiple rows. To work with an aggregation calculation, set the agg property of the Column to the AggDescriptor object that contains the properties associated with the aggregation.

CALC

  public static final int CALC = 1
Constant used to designate a basic calculated field that is updated by the calcFields event of a Column when rows are changed or added.

LOOKUP

  public static final int LOOKUP = 3
Constant used to designate that this column gets its value from a Column in another DataSet. The Column.PickList property must be set with the PickList.LookupDisplayColumn set to a non-null value for the lookup to work.

NO_CALC

  public static final int NO_CALC = 0
Constant used to designate that a calculation is not used for this Column.