SECTION 4
Lesson 4.1: Organizing Report Data

   

 

 

Reports, like forms, can contain calculated controls. You will primarily use calculated controls to find subtotals and totals, though they can contain logical operations as well. Let’s take a look at the Employee Sales by Country report found in the Northwind sample database:

 

 

This report contains many different controls; in fact the only header that does not contain a calculated control is the Country Header! Take a look at the Country Footer in the picture above. It contains four calculated objects: one that labels the sales by each employee by the country and the numerical value and another that labels the percentage of sales by each employee as a piece of the years total sales. In action, the calculated controls look like the following:

 

 

These calculated controls are text boxes that have a mathematical expression in their properties. The Control Source field contains an expression and displays the result. Despite the level of calculation that can be performed in a report, most of the arithmetic you will need to do will be relatively simple. For example, the Percent USA is of Grand Total field is no more complex than the country total divided by the grand total.

The one thing to remember when creating calculated controls is to make sure each control is given a meaningful name. You can modify the name of the control in the Other tab of the object properties.