Number Formatting

How do I

When designing forms, you can change how you want numbers to print.

Numbers that appear before the decimal point are designated with a capital N, and numbers that appear after the decimal point are designated with a lower-case n.

Suppose you wanted normal decimal points and commas. You might use NN,NNN,NNN.nn as your template. Using this template, one thousand would be printed as 1,000.00 and one million would be printed as 1,000,000.00.

Here are some important points about the template:

  • You can place signs (plus or minus) either before or after the numbers.
  • If a minus sign (-) is used, it appears only if the number is negative.
  • If the plus sign (+) is used, a minus sign appears if the number is negative and a plus sign appears if the number is positive.
  • If parentheses (()) or angle brackets (<>) are used, they only appear if the number is negative.
  • If the sign is doubled before the number, for example, two minus signs (--) or two dollar signs ($$), then the sign appears right next to it. When you use a single sign, a space appears between the sign and the number.

For example, we will print 1234.56 and -1234.56 using various formats:

-NNN,NNN.nn

1,234.56

- 1,234.56

+NNN,NNN.nn

+ 1,234.56

- 1,234.56

--NNN,NNN.nn

1,234.56

-1,234.56

++NNN,NNN.nn

+1,234.56

-1,234.56

$NNN,NNN.nn

$ 1,234.56

$ -1,234.56

$$NNN,NNN.nn

$1,234.56

$-1,234.56

NNN,NNN.nn-

1,234.56

1,234.56-

NNN,NNN.nn+

1,234.56+

1,234.56-

(NNN,NNN.nn)

1,234.56

(1,234.56)

Note: There is one other way to designate negative numbers that is not covered by the format. This is by using a different font or color. For example, for negative numbers, you can print them in red, assuming you have a color printer. Unique font settings for negative numbers can only be set up in individual data objects. You cannot establish a negative font for data fields within a group object.

What do you want to do next?