Navigation:  Reference > Report Objects >

TppDBCalc

Print this Topic Previous pageReturn to chapter overviewNext page

 

Description

 

Used for simple database calculations (Sum, Min, Max, Count and Average). The value can be reset when a group breaks using the ResetGroup property.

 

The TppDBCalc component is a data-aware report component used to perform common report calculations and print the resulting value. The calculation is performed based on the value of the field specified in DataField Use the DBCalcType property to indicate the necessary calculation.

 

Calculations such as group totals are available through ResetGroup property. Each time the field value for the Reset Group changes (breaks), all associated DBCalc components are reset to zero.

 

Use the DisplayFormat property to control how the text is formatted. Text alignment of the caption is determined by the value of the Alignment property. You can force the control to resize to fit a changing caption by setting the AutoSize property to True.

 

You can control the appearance of this component (Font, Alignment, etc.) at design-time by using the Format Bar of the Report Designer. The Format Bar also allows you to set the DataField property from a drop down list box at the far left. You can also set key properties by using the speed menu. To access the speed menu, position the mouse cursor over the component and click the right mouse button.

 

PALETTE ICON & EXAMPLE

Alignment

AutoSize

ColorThe background color of the object.  Defaults to white.

DataField

                DisplayFormat

       

The DBCalcType  determines what type of report information is calculated and printed on the report. This property can be set   from the report control's speed menu. For report group calculations you can use the ResetGroup property to   enable a calculated value to be reset to zero each time the value of the field changes.

 

        Options are

dcCount -        Count one for each group of records where the ResetGroup field value is the same

dcSum -        Sum data values for each group of records where the ResetGroup field value is the same

dcMinimum - Minimum data value for each group of records where the ResetGroup field value is the same

dcMaximum - Maximum data value for each group of records where the ResetGroup field value is the same

dcAverage - Average of all data values for each group of records where the ResetGroup field value is the                    same        

 

LookAhead is designed to allow you to display summary calculations in the title band, page footer calculations in the page header band, group footer calculations in the group header band and column footer calculations in the column header. When the LookAhead property is set to True, the draw command which represents the component on the rendered page will continue to update with the most recent calculation value until the report completes the generation of the associated page, group or column.

 

Font

Height

Left

Name

OnPrint

ShiftWithParent

Tag

Top

Transparent

Visible

Width

WordWrapIf you want to allow the object to wrap sentences as though this were a memo field then check this object.  If you also have AutoSize checked the object will grow in length to the appropriate number of lines that are required to print the entire object.

 

See Also OnPrint

 

 

 

 

 

 


Page url: http://www.cassoftware.com/tas/manual/tppdbcalc.htm