| Form Letter
OVERVIEW
This tutorial illustrates how to create a form letter. The report will include
these items:
‧ A letter for each customer in the database
‧ The name and return address of the recipient within each letter
Task 1 Create a Brief Letter
The first thing you'll need to do is compose a 23 line letter in WordPad. We'll
use this letter to illustrate the process of opening a document via the RichText
component and changing it into a Form Letter.
1 Select Start | Programs | Accessories | WordPad.
2 Compose a 2-3 line letter addressed to:
Earl Gray
1000 Pocahontas Drive
Burlington, KY 45001
3 Select File | Save from the WordPad main menu.
4 Select Rich Text Format from the 'Save as Type' drop-down list box.
5 Locate the directory
6 Save the file under the name My Letter.
7 Shut down WordPad.
BUILD THE REPORT
Task 1 Select Data
1 Return to ReportBuilder.
2 Create a new report.
3 Access the Query Wizard.
4 Select the Clients table.
5 Click Finish
Task 2 Lay Out the Detail Band
1 Access the design workspace.
2 Select the Report menu option and remove the header and footer bands.
3 Expand the detail band to one inch.
4 Place a RichText component
in the detail band.
5 Align the left edge of the component with the one inch mark on the horizontal
ruler.
6 Right-click over the component and select MailMerge.
7 Right-click and select Edit. A new window will open:
8 Select File | Open. Locate your letter and click Open.
9 Your letter should appear. Maximize the win-dow.
Task 3 Make My Letter into a Form Letter
1 Double-click over the recipient's first name.
2 Select Edit | Insert Field. A dialog box will appear with a list of fields:
3 Double-click on FIRST_NAME. The name Earl should be replaced with the First
Name field.
4 Double-click over the recipient’s last name.
5 Select Edit | Insert Field.
6 Double-click on LAST_NAME. Gray should now be replaced with the Last Name
field.
7 Close the window and click Yes when the save prompt appears.
Task 4 Experiment with MailMerge
1 Preview. The letter is now addressed to the people whose names are in the
database.
2 Return to the design workspace.
3 Right-click over the RichText component and click MailMerge to deselect it.
4 Right-click and select Edit.
5 Select the Edit menu. The Insert Field option is not available. The MailMerge
option allows you to insert fields, changing static text into form letters;
therefore, if MailMerge is not selected, you cannot insert fields into a letter.
6 Close the window.
Task 5 Create a Form Letter
1 Return to the design workspace.
2 Right-click over the Rich Text component and select the MailMerge option.
3 Right-click and select Edit.
4 Open 'Form Letter.rtf' in the directory containing your ReportBuilder application.
This is a mock form letter. We want to be able to send it to all the people
in the client table; therefore, we're going to need to replace the current name
and return address with fields that contain data for each person.
5 Double-click the name Jane in the return address at the upper left corner
of the screen.
6 Insert the First Name field. The name Jane should be replaced with the First
Name field.
7 Repeat the process for the following fields:
last name
address
city
state
zip
8 Replace Jane and Plain in the first line of the letter with the first and
last name fields.
9 Replace Jane in line nine with the first name field.
10 Close the window and save. The layout should look like this:
11 Press Ctrl + S and save the report under the name Form Letter.
12 Preview. The name and return address for the each person in the database
appear, but the letter does not. In order for the letter to print, we must change
some settings on the Rich Text component.
Task 6 Modify the Component
1 Return to the design workspace.
2 Right-click the component and select Stretch.
3 Preview. A portion of the letter prints, but the text is truncated on the
right due to the width of the component.
4 Return to the design workspace.
5 Select the component and widen it by dragging the right side to the 6.5 mark
on the horizontal ruler.
6 Preview. The first letter is addressed to Jennifer Davis. Scroll down. Notice
that the second letter (addressed to Arthur Jones) prints at the bottom of this
page. We want each letter to print on a separate page.
Task 7 Create a Group
1 Return to the design workspace.
2 Select Report | Groups.
3 Click Add and select Clients.Acct.Nbr from the drop-down list box.
4 Check Start New Page.
5 Click OK. The layout should look like this:
6 Preview. Now when there is a new account number, a new group begins; therefore,
the problem of a letter printing immediately after an existing one is resolved.
Here is what the final preview screen should look like:
7 Close the Report Designer and save the changes.
|