Udostępnij za pośrednictwem


Formatting Numerical Data (Report Builder)

Numeric field data, including dates and monetary values, are formatted using the Number tab of the Format dialog box. The options displayed on the Number tab changes depending on the type of data contained within the cells that you are formatting. To customize the appearance of your numerical data, you can enter a valid .NET Framework format string. For more information about valid .NET Framework format strings, see the Microsoft Developer Network (MSDN).

Note

If you find that formatting options you want to use are grayed out, it means that the field's data type, which is located in the data source, and the formatting options are not compatible. For example, if the field contains numeric values but the field's data type is "string", numerical data formatting options, such as currency or decimals, cannot be applied and the numerical formatting options are grayed out.

Using Decimals

By default, Report Builder displays monetary, percentage, and decimal numbers to the second decimal place. Exponential numbers display six decimal places by default. However, up to 99 decimals places can be displayed. The decimal separator can be displayed as a period or a comma, depending on the locale settings of the data source.

Adding a Thousand Separator

To make numbers more readable, you can add a thousand separator. Depending on the locale settings of the data source, the separator is either a comma (,) or a period (.).

Indicating a Monetary Value

When formatting numbers as monetary values, a monetary symbol is automatically added. By default, the monetary symbol used is based on the locale settings of the data source. You can change the symbol used by typing a different symbol in the Symbol box on the Number tab.

Formatting Negative Numbers

By default, negative numbers are displayed in the following format: -1234.10 but you can change the format to (1234.10).

Change History

Release History

17 July 2006

New content:
  • Added note about grayed out formatting options.

See Also

Tasks

How to: Format a Number Field (Report Builder)
How to: Format a Date Field (Report Builder)

Concepts

Formatting a Report (Report Builder)
Formatting within the Data Source

Other Resources

Format Dialog Box (Number Tab) (Report Builder)

Help and Information

Getting SQL Server 2005 Assistance