borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.dataset
java.lang.Object +----borland.jbcl.dataset.CalcType
Variables Properties MethodsThe CalcType class defines the types of calculations that a Column may involve: no calculations, a calculated value, or an aggregate value. 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). You access the AggDescriptor object through the agg property in the JBuilder Component Inspector.
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 saved and whenever a row is posted. For more information on using calculated columns, see Using calculated columns in the Database Application Developer's Guide.
For examples of applications that use calculated values, see the following projects in the specified directories of your JBuilder installation:
public static final int AGGREGATE = 2Constant used to designate a calculated field that 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.
public static final int CALC = 1Constant used to designate a basic calculated field that is updated by the calcFields event of a Column when rows are changed or added.
public static final int NO_CALC = 0Constant used to designate that a calculation is not used for this Column.
public static final boolean valid(int calcType)Returns true if the specified int is a recognized calcType variable, otherwise, returns false.