Question

Reporting services use format strings to auto format cell data. For example "c2" formats a cell to be displayed as currency with a decimal precision of 2.

Does anyone know where I'd find a comprehensive list off all the different formats available?

Was it helpful?

Solution

Reporting Services uses the .Net formatting strings. So you can look them up on MSDN. Here is a link to the standard codes and here is the reference for creating custom codes.

A standard code is one like "C2" you gave as an example and the advantage is that it's "aware" of you're Regional Settings. So C2 in the US is formatted differently to C2 in Japan.

A custom code allows you to roll your own. e.g. "#,##0.0" will format a number to one decimal place with thousands seperator and will have a leading 0 if the value is between 1 and -1. With a custom string you can also have seperate formatting if it's positive, negative or 0.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top