Monday, March 12, 2012

Number format with negatives

I am trying to change the negatives to (1) instead of -1. I am using N0 as my format but I dont want to use currency because I dont want the dollar sign. How can I change this? Is there anyway to use currency without the $ sign?
MattTry the following format code on the textbox:
##.00;(##.00)

More details about format codes for numeric values can be found on MSDN:
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp
* http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcustomnumericformatstringsoutputexample.asp
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconstandardnumericformatstrings.asp

BTW: the currency sign will always depend on the setting of the Language property (either of the report or individual textboxes). Set the language to a specific culture and you should get currency signs accordingly.

-- Robert

No comments:

Post a Comment