Collect! Credit and Collection Software™

  Page Table of Contents Related 'How To' Tutorials

How To Create An Envelope Report

This tutorial demonstrates how to use the @RECT function of Collect!'s report writer to format address information for printing on letters to be sent in windowed envelopes. This information may be applied to any kind of windowed envelope. You can also use it for printing directly on envelopes.

This should help you expedite the mailing of large numbers of letters.

Address Information Displayed In A Windowed Envelope

The @RECT command is a powerful formatting tool for both text and graphics within the Collect! report writer. One of the most common and practical uses of this command is to print large blocks of text aligned to an exact page position. In this tutorial, we are going to create two address blocks in a debtor letter so that they are aligned correctly for a windowed envelope.

We will use the @RECT command to position the company mailing details in a small window on the upper left corner of the page and the debtor's mailing information in a slightly larger window to the lower right of the first.

Click here for information on how to use the @RECT command.

Planning Your Report

Now that we have explored the practical uses and technical aspects of the @RECT command, we can prepare to use it in a report. Before beginning to design the report, we will do a mock-up of the letter you plan to print.

Mock-up Letter

Take a piece of paper of the same size and dimensions as the letter you will be designing. Draw a rectangular box, with a pen or pencil, exactly where you want the address information to be displayed. Draw a smaller rectangle for the return address window, if there is one. To be sure that the positions are right, fold up the mock letter and place it in one of the envelopes you will be using. Will the addresses be visible through the envelope windows, if they are printed in the rectangles you drew? If not, make whatever adjustments are necessary to the rectangles in your mock-up so that they fall perfectly within the window areas of your envelope.

Finally, draw a line where you folded your letter to fit it into the envelope.

Useful Note If you take the time to map out every part of your letter in this way, you will save valuable time when you design your

report. With this mock-up accurately prepared and measured, you are spared the frustration of repeatedly changing and tweaking the dimensions in your report.

You may want to tweak your final report just a little, to get an absolutely perfect, professional looking letter.

Measuring Values for the @RECT Command

Now that your mock-up is completed, we are going to take the measurements of the rectangles so that we can use them in the @RECT command.

Here is an example of the measurements you will need:

Address Position Measurements

To obtain these measurements, for each rectangle:

1. Measure the distance from the upper left hand corner of the rectangle (marked with the red dot in the screen shot) to the LEFT side of the paper. This is the LEFT value. For example, LEFT =.25 inches. Jot down this value next to the rectangle that you are measuring.

2. Measure the distance from the upper left hand corner of the rectangle (marked with the red dot in the screen shot) to the TOP of the paper. This is the TOP value. For example, TOP = .20 inches. Jot down this value next to the rectangle that you are measuring.

3. Measure the distance across each block, the HEIGHT and WIDTH. Write these values on your mock-up, next to the rectangle you are measuring. For example, HEIGHT =1 .00 inches, WIDTH = 2.00 inches.

4. The @RECT command uses values in measured in 1/100ths of an inch. So, we multiply each of the measurements by 100 to get the
measurement units used by the report writer. So two inches becomes two hundred units. For example, LEFT = .25 inches x 100 = 25 units; TOP = .20 inches x 100 =20 units, and so on.

Jot these calculations down on your mock-up so that each measurement is converted into 1/100ths of an inch. Keep this handy while writing the report!

Measuring Position of the Fold Line

Measure the distance from the top of the page to the line that you drew to mark where you have to fold your letter. Multiply this by 100 to give you the units used by the report writer. For example, TOP TO FOLD = 3.75 inches x 100 = 375 units.

Useful Note If you are printing directly onto your envelopes, measure your two address blocks on a mock-up envelope, but you don't need to mark or measure a fold line.

Top of page.

Creating The Report

Now that you have your report planned and formatted, it is time to open the report writer and type in the codes necessary to turn this concept into a finished document.

1. Sign into Collect! and stop at the Main Menu.

2. From the top menu bar, select Print and then select Edit Reports from the drop-down choices. This will bring up the list of all the reports in Collect!

3. Select the NEW button at the bottom of the Report Definition list. This will open a blank Report Definition.

4. Select the field labeled Name and enter a name which is meaningful to you, for example, "Windowed Debtor Letter Template."

5. Select the field labeled Start on and then select Debtor from the list that appears.

6. Select the OPTIONS button in the lower left hand corner of the window. This will bring display the Report Options form.

7. Select the down arrow next to the field labeled Destination and then select Printer from the pick list that appears.

8. Select the field labeled Printer initialization codes and enter the following text.


9. Select the field labeled Printer termination codes and enter the following text.


These codes will reset the printer, set the page orientation to portrait, and the font to H (By default, Times New Roman, size 18).

10. Press F8 to save your settings and close the Report Options form.

So for a brief recap, we have now created an empty report called "Windowed Debtor Letter Template" (or whatever name you chose).

It will be taking information from a supplied Debtor record, and it will print to your printer in Portrait format, in Times New Roman font, size 18.

Top of page.

Entering The Report Codes

Now for the nitty gritty. We are going to enter the individual codes that tell the report writer how to format the report and what information to print.

The report will proceed in two series of @RECT statements, four in total, which will form the two boxes. One box will contain the company information and the second box will contain the debtor information.

After the two boxes, we will draw a line to indicate where the letter should be folded to fit into your windowed envelope.

Here is a list of the database codes used in this report: - Form: Company Details, Field: Name - Form: Company Details, Field: Address Line 1
@cd.a2 - Form: Company Details, Field: Address Line 2
@cd.a3 - Form: Company Details, Field: Address Line 3 - Form: Debtor, Field: Name - Form: Debtor, Field: Address
@de.a1 - Form: Debtor, Field: Address Line 2 - Form: Debtor, Field: City - Form: Debtor, Field: State
@de.zi - Form: Debtor, Field: Zip

Here is a list of the report commands used in this report:


The rectangle command, as explained above.


The line command, which draws a line across the page from one point to another, indicating the fold line. This is optional, if you are printing directly onto your envelopes, ignore this command.

You should be looking at the Report Definition for the your "Windowed Debtor Letter Template" report. Select the Report Body and let's start entering those codes!

1. Begin with an @RECT command.

This will begin your first box. Use the measurements you took earlier and feed them into the command in the order listed above. (To recap, it was left, top, width, height). For the last two values, enter 0 and 1 respectively. This should yield the following line.


Where left, top, width, and height correspond to your measured values, in 1/100ths of an inch.

2. Next we are going to print the Company Name in bold, followed by the mailing address, followed by the city, state, and postal code.

@cd.a2< @cd.a3

This assumes that your Company Details have been entered correctly, that the first line of your address is your street address, that the second line is your city and state, and that the third line is your zip code. The @! code turns the bold text option on and off, while the < symbol trims trailing spaces at the end of fields.

3. Now, close the rectangle with another @RECT command.


This completes our first box, for company details.

Now begin another box using the measurements you took earlier, for the debtor information.

1. Type another @RECT command into your report body.


Where left, top, width, and height correspond to the values you measured for your second rectangle, in 1/100ths of an inch.

2. Next, enter the debtor information, as shown below.

@!!< @de.a1<,<, @de.zi

This assumes that the Debtor form has been completely filled out, including all the above fields.

3. Now close that box with another @RECT command.


This completes the second box.

All that remains is to draw the line showing where to fold the letter. The placement of this line depends on the size of envelope you are using. You can fold your mock-up and fit it into the envelope so that you know the ideal placement for the fold line. This should be equal to the height of the envelope. Ideally, the fold line should run the length of the page. Printers usually don't print all the way across the whole page, or starting directly at the top of the paper. So you should subtract around a quarter of an inch (25 units) from your measurements.

For example, when using 8.5"x11" paper with a 9.5"x4" envelope (standard letter size paper with a standard letter size envelope),

the first endpoint of the line should be located at the coordinates 0, 375. This means, start right at the left edge and 3.75 inches from the top of the page. The second endpoint is at the coordinates 800, 375. That means, the line is 8 inches long, ending near the right edge of the paper, also 3.75 inches from the top of the page. (This allows for 8.5"x11" paper with 0.25 inches off each margin.)

So the line command would look like this:


The last two values set the width to 1 pixel and the style to 1, which is the value for a dashed line.

Altogether your codes should be similar the snippet shown below.

@cd.a2< @cd.a3
@!!< @de.a1<,<, @de.zi

Useful Note Sample values are shown above for the @RECT (left, top, width and height) arguments. Notice how these relate to the measurements taken earlier. Remember that the last two arguments, 0 and 1, mean no "border" and "clip."

Address Position Measurements

Congratulations! You have completed the part of your report that will display the debtor and company information visible through the windowed envelopes. For the body of your letter, you may type your standard first notice or whatever information you would like to convey to your debtors. Now that this segment of the letter is completed you may copy and paste it into whatever other letters you wish, saving yourself further time in the long run, when dealing with a series of similar letters.

In addition, by replacing the information inside the boxes, with client information for example, you can preserve the same formatting for your client letters, as well.

Furthermore, you have just learned a powerful formatting technique that can be used to help you position text and graphics in any number of ways. This enables you to develop flexible and professional looking letters and reports that will impress clients and let your debtors know you mean business.

Top of page.

Mail Merge Alternative

With modern printers, the above methodology may not work as you may get warnings about the page size not matching.

A more elegant solution would be to use Mail Merge with Microsoft Word.

1. Create a report that exports the address block information into a CSV. Your design could be based on a tagged list or it could loop through the in-progress letter contacts.

2. Create a Sample CSV file and place it in the Collect\bin\styles folder.

3. Create a Microsoft Word mail merge envelope template and link it to the CSV.

Useful Note When linking the template to the CSV, use the same path that everyone will use so it can be opened by anyone. Examples: S:\bin\styles\envelope.csv or \\server\Collect\bin\styles\envelope.csv

4. Save the template in the Collect\bin\styles folder.

5. In the Collect! report, go to the Report Options and set the following:

- Destination = Other

- Redirect to = Examples: S:\bin\styles\envelope.docx or \\server\Collect\bin\styles\envelope.docx

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.

Please click this link to send us your comments:

RMA RMA Canada ACA Member