| Mailing Label
OVERVIEW
The first section of this tutorial demonstrates how to print mailing labels
via the Label Template Wizard, which is a tool that creates report layouts suitable
for printing on label sheets. Each label will include the following items:
‧ A contact name
‧ The company name for each contact
‧ The mailing address for each contact
THE LABEL TEMPLATE WIZARD
Task 1 Select Data
1 Create a new report.
2 Access the data workspace.
3 Select File | New from the main menu.
4 Double-click on the Query Designer icon:
5 Maximize the Query Designer by clicking the Maximize icon in the title bar:
6 Double-click the Customer table.
7 Click the Fields tab.
8 Click the All Fields check box:
Task 2 Create a Calculated Field
1 Click the Calcs tab.
2 Double-click the City field. City(2) will appear as the first calculation
in the list at the bottom half of the screen:
3 Click on the new City(2) calculation.
4 Expand the drop-down list in the Function column and select Expression from
the list. An edit box will appear in the Expression column.
5 Place your cursor in the edit box.
6 Enter the following expression:
city + ', ' + state + ' ' + zip
Each element of this expression has the following
meaning:

city + ', ' + state + ' ' + zip
A Gets the value of the City field
B Places a comma and a space between the city
and state
C Gets the value of the State field
D Places a space between the state and the zip
E Gets the value of the Zip field
The + symbol represents the concatenation operator. Concatenation is a process
by which values are combined into one result. A typical result for this expression
would be 'Columbia, MO 65203'.
A B C D E
7 Rename the City(2) field alias by clicking once on City(2), then waiting
a second. This will put the field alias in 'edit' mode. Type CityStateZip in
the edit box. The Calculation field should look like this:
Task 3 Sort the Data
1 Click the Sort tab.
2 Double-click on Zip.
3 Click OK. A dataview will appear. Click the preview icon on the dataview:
4 Scroll to the right until you see the Zip field. Notice that the data is ordered
by ZIP Code (the companies with no ZIP Code appear first.). The
last column should contain the combination of the city, state, and ZIP Code,
as specified in the calculated field we created.
5 Click OK.
Task 4 Configure the Report Layout
1 Access the design workspace.
2 Select File | New from the main menu.
3 Double-click on the Label Templates icon:
4 Make the following selections:
Printer information Laser and ink jet
Paper Tray Manual Feed (Tray 1)
Products Avery Standard
5160 – Address
The Label Template dialog box should look like this:
5 Select OK. The report layout should look like this:
Task 5 Lay Out the Detail Band
1 Place a shape in the detail band.
2 Set the shape to ParentHeight and ParentWidth.
3 Preview the report. The shape indicates where the detail band is printing.
Notice how the detail band prints in a columnar pattern and is positioned just
like the labels on the sheet.
4 Place four DBText components in the detail band:
5 Set the following positions for the DBText com-ponents:
DBText1 Left 0.08
Top 0.06
DBText 4 Left 0.08
Top 0.77
6 Select DBText1, then shift-click the other com-ponents.
7 Align the components left and space them vertically.
8 Right-click over each component and set it to AutoSize.
9 Assign the components to the following fields:
DBText1 Contact
DBText2 Company
DBText3 Addr1
DBText4 CityStateZip
|