Letters, Labels, and Envelopes
Like Forms, Browses, and Reports, Letters, Labels, and Envelopes are layouts. They follow many of the same design principles, but the default layout for each is specific for its type. In Letters, Labels, and Envelopes, you use Rich Text Objects for most of their design. Alpha Five Genies help you get set up easily and quickly with all three layouts.
Letter templates are layouts for printing traditional mail-style letters. You can merge record information with text layouts to create personalized letters.
Typically, you use label templates for printing mail labels for envelopes. However, labels are also useful for generating file folder labels, identification cards, and name tags, based on data from a table or a set. Alpha Five gives you complete flexibility in designing Labels, along with several common pre-defined formats.
Alpha Five divides the structure of a letter into regions, layout areas where you place Letter objects. Alpha Five lets you create page header and footer regions, a letterhead region, and continuation header and footer regions.
With letters, you can do the following tasks:
Type the body text of a letter, and place fields from the Drag-and-Drop List in the text, to create customized letters for each record.
Insert conditional paragraphs in your lLetter, or use conditional commands to include or exclude parts of your Letter, based on data from a table or set, giving you a dynamic way to customize your letter.
Place lines, frames, pictures, and borders in your letter. You can include your company logo in the letterhead section, or insert frames or lines to group or divide parts of the Letter.
Order and filter the records that appear in the letter by storing order and selection criteria in the letter, by letting the user specify the order and selection criteria at print time, or by using a combination of the two.
To create a letter, you can use the Letter Genie, which prompts you step by step to help you create your letter, or you can work directly with the Letter Editor. In the next procedure, you use the Letter Genie to create a form letter for AlphaMovies customers, detailing an incentive program designed to keep them coming back.
To use the Letter Genie:
Open the AlphaMovies database.
Note: You should have already created the AlphaMovies database in the Creating a Database lesson.
In the Control Panel, display the Letters tab, and click New.
Version 6. The New Letter Genie appears. In this dialog box, you select the table or set that provides the source of data for the letter. Click OK to continue.
Version 5. The New Object Genie appears. In this dialog box, you select the table or set that provides the source of data for the letter. Select the Invoice set, and click Finish.
The Form Letter Genie appears. [Picture]
Select Use the Letter Genie and click OK. The Letterhead page of the Form Letter Genie appears, and prompts you to provide letterhead text and alignment. [Picture]
Check Include your name and address in the letterhead,.
Select Center alignment.
Enter the following name and address:
70 Blanchard Rd., Suite 206
Burlington, MA 01803
Click Next. The Addressee page of the Form Letter Genie appears, and prompts you to define the address format.
In the Table list select "Customer".
Place your cursor in the first of the six address type-in fields at right.
In the Fields list select "First_Name" and click .
In the Fields list select "Last_Name" and click .
Place your cursor in the second of the six address type-in fields at right.
In the Fields list select "Address" and click .
Place your cursor in the third of the six address type-in fields at right.
In the Fields list select "City" and click .
In the Fields list select "State" and click .
In the Fields list select "Postal_Code" and click . [Picture]
Add spaces between the fields and a comma after City.
Click Next. The Salutation page of the Form Letter Genie appears.
Select "expression" from the first drop-down list box. The Expression Builder appears.
Select "Field Name" from the list at left.
Select "Customers" in the Select Field dialog.
Select "First_Name" and click Insert.
Repeat step 14 for the next list box and the "Last_Name" field.
You provide the following salutation, and click Next. [Picture]
Check Include today's date about address block.
Select a date format from the Format list.
Add the following text on the Close page of the Form Letter Genie.
Sincerely, The Gang at AlphaMovies
Click Next. The Select Records page of the Form Letter Genie appears. [Picture]
Keep the default, All Records, and click Next. The Record Order dialog box appears.
Click Next. The Finish page of the Form Letter Genie appears. [Picture]
Keep the default, View the Form Letter design, and click Finish. The letter appears in the Letter Editor. [Picture]
Click and enter "Incentive" in the Save Letter as Name field.
Click the Print Preview button to view the Letter.
Click Exit Preview when you are finished.
In the next procedure, you add letter text and fields to your Letter.
Working with Rich Text Objects
You use Rich Text Objects for most of the design work in letters. When you first create a letter, Alpha Five places a Rich Text Object in the letter body region. Within this region, you can type in text, insert fields, and place conditional commands to include or exclude conditional paragraphs.
To add a Rich Text Object to a letter region:
Select the Rich Text Tool in the Toolbox .
Click and drag the cursor over the letter region in which you want to insert the object.
When you release the mouse button, Alpha Five creates the object.
Before editing a Rich Text Object, you must first activate the Rich Text Editor.
Activating the Rich Text Editor
The Alpha Five Rich Text Editor gives you many word-processing capabilities. You can select a variety of fonts, styles, and sizes, align paragraphs of text, insert page breaks, and find and replace words and phrases.
The Rich Text Editor is activated when you are in a Rich Text field, or when you double-click a Rich Text Object while editing a layout. When the editor is active, the Text menu appears in the Alpha Five menu bar.
Alternatively, you can create and format letter text in other word processors. You can copy the text to the clipboard and paste it in the Rich Text Object, or save the text as a Rich Text Format document, and import it into Alpha Five.
To activate the Rich Text Editor.
Double-click on the letter's body Rich Text Object. The Rich Text Editor Text Toolbar appears.
Adding Text and Fields to Letters
To add text to the object, simply type in the text you want to include. You can add fields to the text, by dragging them from the Drag-and-Drop List, and placing them in the object.
To insert calculations, select Text > Insert, and select Expression from the pull-out menu, or drag "<New Calc/Summary Field>" from the Drag-and-Drop List.
When the Expression Properties dialog box appears, type the expression in the Expression field, or click the drop-down list button to create the expression in the Expression Builder.
Inserting Conditional Text
With Alpha Five, you can use the same form letter layout to create different letters, by using conditional text. You use the Rich Text Editor or the Text Toolbar, to specify conditional commands to either include or exclude text, depending on the underlying data. This lets you create one letter layout that you can use for printing multiple versions of the same letter.
For example, AlphaMovies wants to send active customers a different letter than it sends to inactive customers. You use the same basic layout for both letters, with a conditional statement to determine which letter body text to include.
In the next procedure, you further personalize the Incentive Letter, and create conditional letter body text for active and inactive customers.
To add fields and conditional letter body text:
With the Incentive Letter in the Letter Editor, double-click on the letter body's Rich Text Object. The Text Toolbar appears.
Place your cursor in the letter text body paragraph, below the salutation.
Click the Insert button in the Text Toolbar. The RTF Insert Command toolbar appears.
A simple conditional statement consists of an IF expression that specifies the condition under which a block of text will print. If the condition evaluates to TRUE (.T.), the text that follows it prints. At the end of the block, you can place an ELSE statement which indicates that the following block of text is printed only when the IF expression evaluates to FALSE (.F.). At the end of the conditional block(s) of text, an ENDIF statement indicates that any following text should be printed in all cases.
This conditional statement uses the following general structure:
IF logical condition
Text to print if the condition is true.
Text to print if the condition is false.
Text to print in all cases.
Click the IF button. The Insert IF Expression dialog box appears. [Picture]
You can type the expression in the Logical Expression field or click the button to create the expression in the Expression Builder. Click the button. The Expression Builder appears.
Click the Create Filter Using Genie button. Note: The Create Filter Using Genie button disappears if you type anything in the Expression Builder window. The Filter Builder appears. [Picture]
Select "Invoice" from the drop down list box at left.
Select "Date" and "is on or after the date".
Enter "12/02/02" and click OK. The expression appears in the Expression Builder.
Click OK. The expression appears in the Logical Expression field of the Insert IF Expression dialog box.
Click OK. The following IF expression appears in the letter body text. [Picture]
Place your cursor at the beginning of the ENDIF statement, and press Enter. Alpha Five creates a new letter body paragraph, between the IF statement and ENDIF.
Press Enter again, and type in the following text:
"Here at AlphaMovies, we appreciate your business. Our records show us that you have bought or rented a movie from our collection this past month.
As a small token of thanks, we have enclosed a certificate for a free box of Best Microwave Popcorn for you to enjoy with your next movie from AlphaMovies.
Come by soon."
In the RTF Insert Command toolbar, click the Else button. Alpha Five inserts "Else" at the cursor.
Press Enter again, and type in the following text:
"Hey, we miss you! Our records tell us that you have not rented or bought a movie from us in over a month.
Frankly, we want you back. Bring this letter for a discount on your next movie rental or purchase.
Come by soon."
The Letter text appears, as shown in the following screen shot. [Picture]
In the next steps, you further personalize the Letter by adding a First_Name field to the Letter body text.
Click the Drag-and-Drop List button. The Drag-and-Drop List appears.
From the Drag-and-Drop List, select the "First_Name" field from the Customers table, and place it after the phrase: "As a small token of thanks".
From the Drag-and-Drop List, select the Customers table "First_Name" field again, and place it after the phrase, "Hey". The Letter body text appears, as shown in the following screen shot. [Picture]
Click Save, and Print Preview.
Use the record selector arrows to view Letters for active and inactive customers. [Picture] [Picture]
In the next section, you learn how to create Labels and Envelopes.
Creating Labels and Envelopes
Alpha Five Genies help you create Labels and Envelopes. Like Letters, these layouts use Rich Text Objects. You can select Envelopes by size, and define the printer format. You can select Labels by brand name and printer type.
Alpha Five Label layouts let you print information on commercially available sticky-labels. Most commonly, you use a label layout to create mailing labels to put on envelopes. However, they have other uses as well. For example, you can use them to create name tags or to catalog objects in an archive.
You can either use the Label Genie, which prompts you step by step to help create your labels, or you can go directly to the label definition.
Using the Label Genie
To create a label, you first select the size criteria. For your convenience, Alpha Five comes with a variety of predefined size templates. After choosing a size, you insert the fields and text that you want to print. Finally, you can set the order and selection criteria to specify the records to print and the order in which they print.
In the next procedure, you use the Label Genie to create film ID labels for AlphaMovies inventory.
To use the Label Genie:
Open the AlphaMovies database.
In the Control Panel, display the Labels tab, and click New.
Version 5. The New Object Genie appears. Select the "Inventory" table, and click Finish.
Version 6. The New Label dialog appears. Select the "Inventory" table, and click OK.
The Mailing Genie appears. [Picture]
Select Use the Label Genie, and click OK. The Mailing Label Genie appears. [Picture]
Select "Avery 5095 - "2-1/3" x "3-3/8"; 2 Across" and click Next.
Specify the following label layout:
Place your cursor in the first of the six type-in fields at right.
In the Fields list select "Tape_ID" and click .
Place your cursor in the second of the six type-in fields at right.
In the Fields list select "Title" and click .
Repeat until the values of all six fields have been set.
Click Next. [Picture]
Keep the default Font selection, and click Next.
Leave the Number of copies of each label set to 1 and click Next.
Select to print All records and click Next.
Leave the Record Order unchanged and click Next.
Select View the Mail Label design.
Click Finish. The label layout appears in the Label Editor. [Picture]
Enter the name "Inventory" in the Save Label As dialog box.
Click Print Preview. The labels appear in the Print Preview window. [Picture]
The procedure for creating Envelopes is almost identical to the procedure for creating Labels. The Envelope Genie guides you through the following general steps:
Select a table or set as the data source.
Specify the Envelope size, and its orientation and alignment when fed into your printer.
Define the Envelope address.
Optionally, include a return address.
Specify a font, and the number of copies of each Envelope to print.
Optionally, specify the record selection and sort order.
Preview the Envelope layout and save it, or use the Label Editor to edit it.
In this lesson, you learned about creating Letters, Labels, and Envelopes, and the use of Rich Text Objects in their design. You learned how to add text, fields, and expressions in the layouts, and how to include conditional text. You also learned about the Rich Text Editor and its word-processing capabilities.
See Data Processing Operations to learn about using Alpha Five Operations for manipulating data.