Lesson 4
Home Up Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8

ASCII table

Assignment 4

Reports

A report is an effective way to present your data in a printed format. Because you have control over the size and appearance of everything on a report, you can display the information the way you want to see it.

 

 

 

 

 

 

 

 

Most of the information in a report comes from an underlying table, query, or SQL statement, which is the source of the report's data. Other information in the report is stored in the report's design.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Sections of a Report

The information in a report can be divided into sections. Each section has a specific purpose, and prints in a predictable order on the page and in the report.

 

 

 

 

 

 

 

 

In Design view, sections are represented as bands, and each section that the report contains is represented once. In the printed report, some sections may be repeated many times. You determine where information appears in every section by placing controls, such as labels and text boxes.

 

 

 

 

 

 

 

 

Creating a Report

1 In the Database window, click the Reports tab.

2 Click New.

3 In the New Report dialog box, click Design View.

4 Click the name of the table or query that contains the data you want to base your report on. (If you want an unbound report, don't select anything from this list.)

Tip If you want to create a report that uses data from more than one table, base your report on a query.

5 Click OK.

 

Adding Controls such as Textboxes and Labels

Everything you add to a form or report is a control. Text boxes, labels, list boxes, option buttons, command buttons, and lines are examples of different controls. The way you create a control depends on whether you want to create a bound control, an unbound control, or a calculated control.

A bound control is tied to a field in an underlying table or query. You use bound controls to display, enter, and update values from fields in your database. A calculated control uses an expression as its source of data. An expression can use data from a field in an underlying table or query of a form or report, or from another control on the form or report. An unbound control doesn't have a data source. You can use unbound controls to display information, lines, rectangles, and pictures.

 

Create a Bound control

1 Open a report in Design view.

2 Display the field list by clicking Field List  on the toolbar.

3 Select one or more fields in the field list.

To select Do this
One field Click the field.
A block of fields Click the first field in the block, hold down the SHIFT key, and then click the last field in the block.
Nonadjacent fields Hold down the CTRL key and click the name of each field you want to include.
All fields Double-click the field list title bar.

4 Drag the selected field or fields from the field list to the form or report. Place the upper-left corner of the icon where you want the upper-left corner of the main control (not its label) to be, and release the mouse button.

Microsoft Access creates the appropriate control for the field and sets certain properties, based on the field's data type and the settings of the DisplayControl property. If this isn't the type of control you want to create, click the appropriate control tool in the toolbox before dragging the field from the field list. You can also change a control to another type of control after you create it.

Assignment