Related Information Examples & Tutorials

How To Control Font Attributes

In Collect!'s Report Writer you have many options for customizing the report output. Several commands are available for setting font attributes like BOLD, UNDERLINED, CENTERED and so forth.

You can also change the font family and size, as well as the font color.

tip.gif Whenever font attributes are used, they must be "switched on" and "switched off." This means that font attributes you set with code remain in effect until the report system reaches the code that ends this font attribute.

For example, if you do not "switch off" your font attributes after you have used them, the font attribute will carry on to your next page of batch printing. We will discuss this further as we talk about each setting.

Printer Control Codes

The first way that you can control your font attributes is through Collect!'s predefined Printer Control Codes.

1. When you are in your Report Body, press F2 to bring up the Choose Report Item form.

2. Select Printer Control Code to display a list of all printer control codes that you can apply to your report.

3. Click on a code to enter it into your Report Body.
Collect! automatically adds the required @ symbol to the command.

Top of page.

Bold

@!

Place the code @! just before the text to switch on the bolding and then place the same code immediately after the text that you are bolding to switch it off.

EXAMPLE:

@!This line illustrates the Bold attribute@!

Prints: This line illustrates the Bold attribute
@!@de.na@!

Prints: Smith, Richard

Top of page.

Underline

@%

Place the code @% just before the text to switch on the underlining and then place the same code immediately after the text that you are underlining to switch it off.

EXAMPLE:

@%This line illustrates the Underline attribute@%

Prints: This line illustrates the Underline attribute
@%@de.na@%

Prints: Smith, Richard

Top of page.

Italics

@&

Place the code @& just before the text to switch on the italics and then place the same code immediately after the text to switch it off.

EXAMPLE:

@&This line illustrates the Italics attribute@&

Prints: This line illustrates the Italics attribute
@&@de.na@#38;

Prints: Smith, Richard

Top of page.

Printer Test To Examine Fonts

To become more familiar with the fonts that are predefined in Collect!, please print out the Printer Test and examine it. You can do this by pulling down the Print menu. Choose Reports and Letters and look for the report named "Printer Test." Print this to your printer.

The Printer Test sheet gives examples of fonts A to F which are "fixed" fonts. This means that each character takes up the same amount of space when printed. That makes it possible to line up columns or place text. You know that they will be lined up just as you have typed them in the Report Body.

The rest of the fonts shown on the Printer Test sheet are "proportional." These fonts are more attractive but you cannot use them to line up columns or text unless you add a formatting symbol to assign a fixed width to the columns. See How To Format Text Fields and Text Variables for more information.

The Printer Test also demonstrates applying different attributes to the fonts, like bold or italics.

Top of page.

Printer Test Codes

When you print the Printer Test, you see the results of choosing different fonts and applying attributes like bold or italics. To see the actual codes used to produce these results, you can print the actual Printer Test report.

Here are steps to PRINT the codes in the Printer Test

1. Select PRINT from the top menu bar, a drop-down menu displays.

2. From the drop-down menu select EDIT REPORTS.

3. A Report definition dialog box displays with a list of various reports and letters.

4. Search for Printer Test by using the UP and DOWN arrow keys.

5. Select EDIT located at the bottom of the dialog window to view the codes.

6. A report body displays.

7. To view the text click on the report body or press F5.

8. To print the page with the codes select PRINT from the printer icon.

9. Select the appropriate printer and click the highlighted PRINT button.

Top of page.

Changing Font Size

There are a number of possible font sizes available in the Printer Control Code list. Fonts are chosen by point size.

For example, "10 cpi" is set with:

@A

tip.gif These font attributes will not show up when you Print to Screen unless the command Print via Browser is selected in Printer Setup. Print a test report to the Printer to see the results of choosing a certain font size.

Top of page.

Changing Font Face Or Type

When you view your letter or report, you may find that the font is not appropriate to your needs. Reports and letters shipped with Collect! have been designed using simple, effective fonts. In some cases, this is necessary so that columns line up and fit on the printed page. For instance, F - the Statement Font - is used for reports with many columns.

Please print out the Printer Test from the list of Reports and Letters, to see samples of the fonts that ship with Collect!

tip.gif If you want to change the font in a letter or report, please be aware that this will affect the way the report or letter looks. You may have to reposition columns, headings and other lines of data. This is because different fonts take up different amounts of space for each character that is printed. We have taken the time to set up all the sample reports and letters this way. However, this set up does depend on the font that is chosen.

Top of page.

Change A Font In Your Report

1. Select Print from the top menu bar and then select Customize Printing, Edit Report Templates.

2. When you are looking at the list of all your Report Definitions, select the one you want to modify. Click on it to open the Report Definition form for that report or letter.

3. Click into the Report Body and look for the code for the font that you want to change.

tip.gif Font codes always start with the @ symbol. So you will be looking for @A or @F or @H, for instance.

4. Using your Printer Test as a guide to font types and sizes, choose a more appropriate font and replace the existing code with the new code of your choice. For instance, if you want to use font N from your Printer Test, you would put @N in your Report Body.

5. If you only want to use the font in a particular place, then you must select a font code to turn the other font off when you are done using it.

6. Save your report and print it. If the new font has shifted some of your printed text, you may need to make adjustments in your Report Body.

If there is no font symbol in your report, just add the font of your choice where you want in the Report Body. It will stay in effect until the end of the report or until you insert a different font code.

tip.gif You can add to the list of predefined fonts or call any font you want in your report. Please refer to Help topic, How to Add a Font to the Report Writer.

Top of page.

Default Font Settings

You can set a default font to use whenever a report or letter is printed. This is entered in the Report Options form. To open this form, press the Options button at the bottom of the Report Definition form.

tip.gif After initializing these settings, you must "reverse" them and "turn them off" when printing finishes, otherwise, the report's formatting may carry into the next letter or report that you print. To "turn off" a command, enter the "reverse" codes in the Printer Termination Codes field.

1. Looking at the Report Options form, locate the Printer Initialization Codes and the Printer Termination Codes fields on the right hand side of the form.

2. In the Printer Initialization Codes field, enter the following command line:

@*PA

In this example, A is the font. You can substitute the letter of the font that you want to use. Please see Printer Control Codes for a list of all possible choices. P means Portrait and refers to page orientation.

3. To reset the printer control codes back to their default values, in the Printer Termination Codes field, enter the following code.

@AP*

This turns off the @*PA codes.(You would substitute the letter of the font that you used.)

Whenever you set a font or printing characteristic, it must be turned off or it will carry over to the next report or letter that you print. It is always a good practice to explicitly declare a Printer Initialization and Printer Termination setting for each report or letter that you use.

Top of page.

Changing Font Color

You can change the color of the font, for instance to highlight Totals or Outstanding Balance.

@Color(r,g,b)

The r,g,b values refer to color values that are a standard used to define color in computer generated documents and Internet web pages. Here is a simple example demonstrating the use of this command.

Amount Outstanding:
@Color(255,0,0)
@de.ow
@Color(0,0,0)

The output of this would be:

Amount Outstanding: $1326.50

In this example, the values for red are used (255,0,0) and then the font is changed back to normal using the values for black (0,0,0).

tip.gif Please make sure you are set to Print Via Device Context when you use this command in your report or letter. To do this, pull down the Print menu and choose Settings, Report and Printer Setup. Make sure that 'Print via device context' is chosen.

Please refer to Color Chart to view some colors you can use in Collect!

Top of page.

Troubleshooting

Trying to call an font that does not exist can result in a System DB Error -19 - Record is Not Legal Member of Set. Examine your report carefully and your list of Printer Control Codes. Make sure your are using a valid font code in your report. Please refer to Printer Control Codes for more information.

Top of page.

See Also

- How To Control Print Attributes
- How to Add a Font to the Report Writer.
- Report Sample to view sample reports and letters
- Report Topics Index for a list of all report and letter topics

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: helpinfo@collect.org