Related Information Examples & Tutorials

Positioning Text And Numerics

This document explains ways to control the placement of text and numerics in your letters and reports using very basic commands. These work when printing CSV reports, fixed length reports and also when printing via Printer Stream.

tip.gif There are also Device Context commands for printing via Device Context. Please refer to Help topic, How To Position Text and Graphics for more information.

Left Justify Text

When you are in the Report Definition form, you will notice a button in the lower left corner of the form labeled 'Options'. Select this button to open the Report Options form.

Report Options

In the Report Options form you will see fields for setting page and margin values for the report you are currently designing or modifying.

tip.gif It may be necessary to experiment with values to get exactly the results you desire. Please refer to How To Print A Sample Report Or Letter for information about printing a sample to try out your settings.

Left Margin

This field specifies the number of columns on the left of the page to skip before printing each line.

tip.gif When printing to the screen, the left margin is ignored. After you review or edit the letter, you can print with the F5 key and you can then specify a left margin before printing.

Report Output Options

When you choose to print a letter or report, the Print Report form is displayed. You will notice several fields similar to the Report Options form, where you can set page and margin settings. The left margin is set as above. The value indicates the number of columns on the left of the page to skip before printing each line.

tip.gif Settings here should not conflict with settings in the Report Options form. You can set the left margin in either or both forms. Ensure that both forms have the same value.

Top of page.

Left Justify Column

To left justify a single field or a single column in your report, use the <value< symbol with a value in characters. For example, @de.na<80< will print the Debtor's name 80 characters wide and left justified.

Top of page.

Page Width And Right Margins

tip.gif Please ensure that your margins are satisfactory before attempting to right-justify text. Right justifying text can be accomplished along with manually setting the right margin in your letter or report or you can let Collect! use the default right margin.

PAGE WIDTH

By default, Collect! sets a page width. This, in turn, sets the right margin automatically. You will notice in the forms discussed above, Report Options and Report Output Options, that there is a field for setting the page width. This is the number of columns you want your report to contain. Normally, this value is around 60 to allow for margins. You can experiment setting the value in the Report Options and Print Report forms but do not put conflicting values in these two forms.

Top of page.

Right Justify Text

After you have ensured that your margins are satisfactory, text can be right-justified using a special technique.

"Fixed" width fonts allocate the same amount of space for each character that you type. Using this information, you can "push" printed output to a position that you choose. Since the fixed fonts are not as attractive as proportional fonts, you can change back to a more attractive font, or the font you were previously using, right before the field that you want to output.

To do this, at the beginning of the line, use:

@A

Then put your field where you want it to appear - on the same line.

For example,

@A@H@de.fi

This code will push the Debtor's file number to the right margin, using the spaces you create in @A fixed font and then, @H changes the font to something more attractive just before the field is output.

tip.gif If you want to place more than one field on the same line, you can use a fixed font to prevent the data from "moving around" depending on the length of the information that is printed.

For example,

@A@de.na@H@de.fi

Be aware that this works because @A is a fixed font. You can use @A,B,C,D These four are fixed fonts. They are not very pretty. So on the next line, you can, for instance, use @H to print "pretty" again.

Alternatively, put @de.na and @de.fi on two separate lines.

For example,

@A@H@de.fi
de.na

Top of page.

Right Justify Column

To right justify a single field or a single column in your report, use the >value> symbol with a value in characters. For example, @de.na>80> will print the Debtor's name 80 characters wide and right justified.

Top of page.

Offsetting Text From The Center

Another method of placing text at the right margin uses the command for centering text. Offset the text relative to the center of the page. This will require a bit of experimenting to move the text to the exact place that you want. Please refer to How To Format Text Fields And Text Variables for an explanation of the use of text formatting symbols. The values entered for these commands refers to characters. So 80 means 80 characters.

To move the text to the center of the page, use the @= command. This centers text when used alone. For example, @=@de.na@= centers the Debtor's name.

To right justify the field, use the >value> symbol with a value in characters. For example, @=@de.na>80>@= will move the Debtor's name 80 characters from the center of the page. You will find that a value between 80 and 140 will probably be what you require to move the field to line up with the right margin previously set by you (or using Collect!'s internal default settings).

tip.gif You will have to use the above method for each line that you want to right justify. When you determine the number of characters that works for you, each field that you want to right justify should use this same value.

For example,

@=@de.na>140>@=
@=@de.fi>140>@=

will right justify two lines of information: Debtor Name and Debtor File Number.

tip.gif If you want to put more than one field on a line, this method will not work, using DC fonts. You will have to use a fixed font as explained above.

Top of page.

Using Tabs To Position Text

Collect! recognizes simply hitting the TAB key on your keyboard. The tab width is the operating system default.

Also, Collect!'s report writer has several codes for inserting tabs in your reports or letters to position text. Please be aware that the behavior of tabs depends on the font you are using. If you use a fixed length font, you can expect more consistent results. With a little experimenting, you should be able to achieve what you are aiming for.

1 TAB

@>

This is equivalent to hitting the TAB key on your keyboard ONCE. You can use more than one. For instance, @>@> @de.na

2 TABS

@|

This is equivalent to hitting the TAB key on your keyboard TWICE. You can use more than one. For instance, @|@| @de.na

5 TABS

@~

This is equivalent to hitting the TAB key on your keyboard FIVE TIMES. You can use more than one. For example, @~@~ @de.na

tip.gif Please test print the results of using tabs in your design to ensure that the text is positioned accurately.

Top of page.

Tab Delimited Report

Collect! enables you to create a report that will write the data to a file, tab delimited. You can use this to export data when you need a tab separator.

SYNTAX: {field code} @>

Top of page.

Example

@de.na @>@de.fi @>@de.ow @>@de.li

This will insert a single 0x09 tab character into the file between each piece of data.

tip.gif The Printer Destination for the report MUST be either 'File' or 'Other' for this to work. You may select one of these choices in the Print Report form just before the report is printed, or set Destination to 'File' or 'Other' in the Report Options form accessed from the Report Definition form's OPTIONS button.

Top of page.

See Also

- Report Topics Index for a list of all report and letter topics
- Report Sample to view sample reports and letters

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