Please enable JavaScript to view this site.

R:BASE 11 Beginners Tutorial

Navigation: Lesson 5 - Report Output

Adding a Grand Total DB Calc object

Scroll Prev Top Next More

We will add a DB Calc object for a grand total field for the Report Footer section.

 

To define the Grand Total DB Calc object:

 

1.In the "Report Designer" window, choose the "DB Calc" button from the "Database Controls" toolbar.
2.Click the left mouse button in the Report Footer under the Daily Total DB Calc object.

 

The DB Calc object will appear with the aggregate function "Sum(?)" as the default and the "Edit" toolbar will become enabled.

 

3.From the "Edit" toolbar, choose the column object TotalCharge.

 

This "SUM" DB Calc object will add all the values in the TotalCharge column for all the rows in the report because you placed it in the Report Footer section.

 

4.Using the handlebars, stretch the width and height of the DB Calc object.

 

To place a Label describing the Grand Total DB Calc object:

 

1.In the "Report Designer" window, choose the "Label" button from the "Standard Controls" toolbar.
2.Click the left mouse button in the Break Footer section to the left of the DB Calc object.

 

The "Label9" text object will appear as well as the "Edit" toolbar will become enabled.

 

3.Enter "Grand Total:" in the "Edit" toolbar.
4.Select the "Right Justify" button on the "Format" toolbar.
5.Using the handlebars, stretch the width and height of the Label object.

 

To align objects across sections:

 

1.In the "Report Designer" window, click on the DB Calc object for TotalCharge in the Break Footer section.
2.Press and hold the [Shift] key, then click on the TotalCharge DB Calc object in the Report Footer section.

 

The two objects are selected as a group and enclosed in red handlebars.

 

3.From the "Align or Space" toolbar, choose the "Align Left" button.

 

The objects are aligned along the left edges.

 

4.Click outside the objects to deselect them.
5.Use the same procedure to align the text objects "Daily Total:" and "Grand Total:" along their right sides.