Printing a text once at the top of a column

Here's a technique for printing the currency sign just once at the top of
a column of numbers, rather than repeating it beside every figure in the
column.

The R&R Field Format Currency command (/FFC) includes the currency sign
each time the field is printed. The following table illustrates the
difference between printing currency signs always, the default behavior,
versus once.

┌──────────────────────────────────────┐
│ Always Once │
│ ------ ----- │
│ $1 $ 1 │
│ $10 10 │
│ $100 100 │
└──────────────────────────────────────┛

There are two ways to produce once-only currency signs, depending on
whcther you want a fixed or floating dollar sign (steps 3a or 3b below).
The easiest way is to have the currency sign in a fixed column of the
report. The example above shows the dollar sign at a fixed location undcr
the letter O in Once.

1. Create a counter
Use the Ficld Total Create command (/FTC) to make a field named COUNT.
Count any field that contains data in every record. Select the
appropriate reset level depending on how frequently you want the dollar
sign to print. For example, select Page to print it once on each page,
or select 1 to print it once per level-one group.

2. Create a currency sign field
Use the Field Calculate Create command (/FCC) to create a field
containing the currency sign as in:

DollarSign = IIF (COUNT=1, "$", "")


3a.Insert the currency sign field at a fixed position
Use the Field Insert command (/FI) to place the DollarSign field two
columns to the left of the numeric field to leave one space between the
fields.
If ÿou want to place the dollar sign next to the numeric field with no
spaces between the fields, you'll need to use the Print Options
Record-Layout command (/POR) to set the option Trim adjacent fields to
No. This prevents left alignment of the numbers.

3b.Create and insert a floating currency sign
You may prefer a floating to a fixed currency sign, meaning that it's
always the same number of spaces in front of the number regardless of
the number of digits in the number. To make a floating dollar sign,
follow steps 1 and 2 as described above. Use the Field Calculate Create
command (/FCC) to create a calculated field containing the currency
sign and the number.
You'll need to specify the correct number of integer and decimal places
in the arguments to the STR function. In this example, the numeric
field contains three integer places and zero decimal places. Use the
Field Insert command (/FI) to insert the PrntAmount field on the report
in place of both the AMOUNT and the DollarSign fields. Since this is a
character field, use the Field Format Right command (/FFR) to
right-align the numbers.

PrntAmount = DollarSign + STR(AMOUNT, 3, O )