Showing posts with label formatcurrency. Show all posts
Showing posts with label formatcurrency. Show all posts

Friday, March 9, 2012

FormatCurrency in 2k5 Report Services

I have a test report, unformatted the value one of my fields is -29.5600

When I apply the format: FormatCurrency(Fields!Paid_Amount.Value) the value shows as -($293056). Another sample is -62.2400 which converts to -($626224).

It seems the leading digits are being repeated for some reason. I've tried playing with rounding, the optional tristate paramaters, and regional settings to get the correct output, but have had no luck. Can anyone be of assistance?Figured it out. Seems I have to use: "$#,###.##"|||Another way for formatting numeric values is to use .NET formatcodes in the "Format" property of the textbox (Note: the textbox value expression has to evaluate to a numeric value otherwise the format code has no effect).

The format code for currency would be: C

MSDN has additional information about standard and custom format strings for numeric values:
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconstandardnumericformatstrings.asp
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp

--Robert

Friday, February 24, 2012

Format Currency Problem - HELP! ANYBODY

I need to display a number field with commas, $, and no decimals.
I tried FormatCurrency(fieldname,0,-1,-1 but the commas don't appear.
How can I accomplish what I need?
Thanks,
Gail BeedieIf your Regional Settings in Control Panel is US, then go to the Format
property of the field in the Properties sheet and type in C0. (letter "C"
followed by a zero).
If your Regional Settings is not US, then go to the Language property of the
textbox, select English (United States) from the listbox, then in the Format
property type in C0.
Alternatively, you can just use an expression: =Format(FieldName, "$#,###").
HTH
Charles Kangai, MCT, MCDBA
"Gail Beedie" wrote:
> I need to display a number field with commas, $, and no decimals.
> I tried FormatCurrency(fieldname,0,-1,-1 but the commas don't appear.
> How can I accomplish what I need?
> Thanks,
> Gail Beedie
>