## Number Format Specification |

Report Magic allows you to customize number formats in some places, most notably for localization. Wherever number formats are allowed, the following discusses how they are applied.

The number format is made up of recognized symbols. Note that however
these may be localized in your language, they should appear exactly as
shown here. (e.g. "`.`

" is a decimal point, even if it will
be shown as "`,`

" when localized for your language.)

`#`

- Represents an optional digit. When placed right of the decimal point means that zero or more digits (whatever exists in the number) will be written after the decimal point. No decimal point will be written if the number has no fractional portion.
`0`

- Represents a single, required digit at the location in the format string. To the right of the decimal, rounds or guarantees that the number shows that many digits of it's fractional portion. To the left of the decimal point, padds the number with 0's as necessary.
`.`

- Represents the location of the decimal point between the number parts. This character will be localized to whatever character is used in the locale to separate integral and fractional componenets of a number.
`,`

- To the left of the decimal point (or end of the format, if no decimal point is given) tells where to place a separator character in the integral portion of the number. For example, many languages split the integral portion into thousands, using a separator: 1,234,556. This character will be localized to whatever characters is used in the locale for this separation.
`%`

- Specifies the location of the percent symbol in the format. This symbol will be localized (where applicable). The number is not divided by 100. It is assumed to already represent a percent quantity/
`$`

- Specifies the location of the currency symbol in the format. This symbol will be localized (where applicable). No conversion is done on the value, it is assumed to already represent the value in the locale's currency.

The following examples may help to clarify the format specification:

Input Value | Format | Output Value |
---|---|---|

87.4 | #.# | 87.4 |

87.4 | # | 87 |

87.4 | #.#0 | 87.40 |

87.4 | #.#% | 87.4% |

87.4 | $#.#0 | $87.40 |

1234.47 | #,###.# | 1,234.47 |

1234.47 | #.0 | 1234.5 |

Report Magic 2.21 Documentation. Copyright © 1999-2003 Wadsack-Allen. All Rights Reserved.