Please enable JavaScript to view this site.

R:BASE 11 Beginners Tutorial

Navigation: Lesson 5 - Report Output

Adding a Daily Total object using DB Calc

Scroll Prev Top Next More

To compute the total daily revenue, you'll place a DB Calc object. The DB Calc object is a data-aware report object used to perform common report calculations and print the resulting value such as COUNT, SUM, MINIMUM, MAXIMUM and AVERAGE. The calculation is performed based on the value of the column specified in "Edit" toolbar. The first thing we must do is stretch the Break Footer section down so we can place the objects inside it.

 

To add the Daily Total DB Calc object to the Break Footer:

 

1.In the "Report Designer" window, hover your cursor over the "Break Footer[0]: FlightDate" section, click, and drag the band a 1/4 inch.
2.From the "Database Controls" toolbar and with one of the other objects selected, choose the "DB Calc" button (looks like a blue calculator).
3.Click the left mouse button in the Break Footer at the 4.5-inch mark on the horizontal ruler.

 

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

 

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

 

The "SUM" DB Calc object adds the values in TotalCharge for the rows in each date group because you placed it in the Break Footer.

 

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

 

To place a Label describing the Daily 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 "Label8" text object will appear as well as the "Edit" toolbar will become enabled.

 

3.Enter "Daily 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.

 

Now you can define the fields for the grand total.