Wednesday, March 7, 2012

Format of zeros

How would I clear up all the zeros in a report to either blanks or dashes?

Example:

With a standard format numbers:

Col A | Col B

--

1.00 | 0.00

I want to clean it up like in Excel's Cell format called "Accounting"?

Col A | Col B

--

1.00 | -

This makes it easy to read

You can use expression to show "-" conditionally, i.e.

=iif(Fields!ColB.Value = 0,"-",Fields!ColB.Value)

|||

You can use custom numeric format strings as well, for example:

=Fields!ColB.Value.ToString("#.00;(#.00);-")

No comments:

Post a Comment