The DBCalc component in R:BASE Turbo V-8 Label Designer eliminates the use of COUNT, SUM, MINIMUM, MAXIMUM, AVERAGE and SUM OF ColName expressions used in earlier versions of R:BASE.

The DBCalc component is a data-aware label component used to perform common label calculations and print the resulting value such as COUNT, SUM, MINIMUM, MAXIMUM and AVERAGE. The calculation is performed based on the value of the field specified in DataField.

Use the "DBCalc Type" to indicate the necessary calculations.


DBCalc Types:


The DBCalc Type property determines what type of label information is calculated and printed on the label. This property can be set from the label control's speed menu.

For label break calculations you can use the ResetBreak property to enable a calculated value to be reset to zero each time the value of the field changes.

Count   Count one for each row in Break where the ResetBreak field value is the same  

Sum   Sum data values for each row in Break where the ResetBreak field value is the same  

MinimumMinimum data value for each row in Break where the ResetBreak field value is the same  

MaximumMaximum data value for each row in Break where the ResetBreak field value is the same  

AverageAverage of all data values for each row in Break where the ResetBreak field value is the same  

Calculations such as Break Totals are available through ResetBreak property. Each time the field value for the Reset Break changes, 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 Label 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 label object and click the right mouse button.

The LookAhead option is designed to allow you to display summary calculations in the Label Header section, Page Footer calculations in the Page Header section and Break Footer calculations in the Break Header section of the label.

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 label completes the generation of the associated page or Break.

Note: The Label Pass Setting property must be set to Two Pass, in order for LookAhead calculations to function reliably.