Groups | Blog | Home
all groups > sql server reporting services > october 2004 >

sql server reporting services : Conditional Formatting


Fiona Harrison
10/13/2004 6:59:08 PM
Hi
I am trying to format a negative number ie -9999 with the following format
and am getting -(9,999).
=iif(Fields!ActualQty.Value < 0, "(0,000)"," 0,000")

Is there a way to get rid of the negative sign and only show the brackets?

And where can I find are some detailed examples for conditional formatting?
Thanks

Robert Bruckner [MSFT]
10/13/2004 9:30:22 PM
The output is culture dependent. For en-US culture just try this formatcode:
0,000;(0,000)

More details and examples can be found on MSDN:
[1]
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcustomnumericformatstringsoutputexample.asp
[2]
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp
[3]
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstandardnumericformatstringsoutputexample.asp
[4]
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstandardnumericformatstrings.asp

--
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]

Sunny
10/14/2004 1:37:11 AM
try

Expression
=iif(Fields!ActualQty.Value < 0, "(" & Fields!ActualQty.Value & ")",
Fields!ActualQty.Value )
And format the field as 0,000


[quoted text, click to view]
jerrynixon NO[at]SPAM gmail.com
10/14/2004 10:45:45 AM
Here's what I use.

with two decimals:

$#,#.##;($#,#.##);$0.00

without no decimals:

$#,#;($#,#);$0

one customer likes zeros to be blank, like this:

$#,#;($#,#);

I like zeros to be "zero", like this:

$#,#;($#,#);Zero

Fiona Harrison
10/14/2004 1:41:04 PM
Hi people
Thanks for your help.
I put the following in the format place and works really well.

#,##0;(#,##0)

Fiona


[quoted text, click to view]
Lynn
1/28/2005 12:19:02 PM
Jerry, thanks for your input! You rock! I've emailed several reporting
services "gurus" I know and none of them came as close to getting it as even
I did!

Here's the format I ended up using (after reading your post) to display
negative numbers with 2 decimal points:

#,#.##;(#,#.##);0.00

The negative numbers display like (99.99) with no negative sign.

Many thanks!

[quoted text, click to view]
AddThis Social Bookmark Button