FormatCurrency Misformatting Currency
FormatCurrency is converting 270000 to $27270,000
May 16th, 2011 12:28pm

Hi, Please could you specify more details, what is the expected result and what is the current output you are getting? If you are using SQL 2K8 then you could click on the textbox properties and you can select the currency as format and try running the report. HTH, Ram
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 1:15pm

I am expecting $270,000. I am getting $27270,000. I found another posting that said use the formatting string $#,###. That works but I would still like to know why FormatCurrency doesn't work as expected
May 16th, 2011 1:27pm

Hey David, That's strange. Are you using the FormatCurrency function? I am pretty sure FormatCurrency (270000, 0) would return $270,000. Please mark correct answers :)
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 1:30pm

Ok, Try adding this expression in the Format box : '$'0.00;('$'0.00) and then run the report. HTH, Ram
May 16th, 2011 1:35pm

I used the FormatCurrency function in an expression and all of my resu,lts look like $27270,000.
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 1:40pm

I have another reeport and the formatting string on it is '$'#,0;('$'#,0). That works. I have another field in my report that uses formatCurrency and it's working just fine there. The number is a double from a calculation and the value I'm using in the field that isn't working is an int. Could that make a difference?
May 16th, 2011 1:57pm

I am using FormatCurrency in the Format properrty. When I use it in the Value property it works just fine. That's my problem and the solution.
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 2:02pm

could you try converting the int to a double and then apply formatting and see whether it works fine or not? Could you also post some expression or sample data so that it would be helpful for quick answers. HTH, Ram
May 16th, 2011 2:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics