September 25, 2008 at 11:57 am
Hi,
I'm using the FormatCurrency function to format currency columns like this:
=FormatCurrency(Fields!field1.Value, 2)
I get values like this:
...
$300000.56
$20000
...
How can I get the amounts to show up with commas every 3 digits and always with 2 decimal places, like this:
...
$300,000.56
$20,000.00
...
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
September 25, 2008 at 12:04 pm
= "$" & Format(Fields!Field1.value,"##,###,##0.00")
September 25, 2008 at 12:58 pm
Glen (9/25/2008)
= "$" & Format(Fields!Field1.value,"##,###,##0.00")
thank you! I'll try that.
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
September 25, 2008 at 3:27 pm
Marios Philippopoulos (9/25/2008)
Glen (9/25/2008)
= "$" & Format(Fields!Field1.value,"##,###,##0.00")thank you! I'll try that.
Actually, this is not giving me the right results:
I have this value in the database: 615.00000
In the report it shows up as: $615615.00
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
September 25, 2008 at 4:02 pm
Marios,
Format() does not change the field value. If instead of 615 you are receieving 615615, you made an error in expression.
September 25, 2008 at 11:20 pm
FormatNumber(yourfield, 2, , ,TriState.True)
and You can always prefix $
September 26, 2008 at 8:18 am
Sorry guys, but I'm not getting the right results.
Take this NUMERIC(16,2) value: 615.00
When I use:
="$" & Format(Fields!col1.Value,"##,###,##0.00")
I get: $615615.00
When I use:
=FormatNumber(Fields!col1.Value, 2, , ,TriState.True)
I get syntax error.
When I use:
="$" & Fields!col1.Value
I again get: $615615.00
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
September 29, 2008 at 12:06 am
I have copy-pasted the text in your messege and tested with 20000 as well as 615.00 hard-coded values, I do not get error in the out put but I get $20,000.00 and $615.00 respectively.
So I wonder what error you are talking about?
September 29, 2008 at 8:43 am
abhijeetv (9/29/2008)
I have copy-pasted the text in your messege and tested with 20000 as well as 615.00 hard-coded values, I do not get error in the out put but I get $20,000.00 and $615.00 respectively.So I wonder what error you are talking about?
Here is the screenshot...
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
September 30, 2008 at 1:06 am
Agreed with the Syntax error that is shown in the Edit Exression window however have you still tried to run the report and see the output?
If not, can you please do so ?
I am sure it will work.
April 9, 2009 at 2:25 pm
I just tried the Formatcurrency function for SSRS and it worked.
Try passing values for all options. The only issue being if the user exports this to Excel, they will not be able to do mathematical calculations on that since this function returns a string
June 12, 2009 at 1:54 pm
Yes, this is correct. In some cases ignore the red warnings. Likely a small bug.
FormatNumber() is the correct way to achieve this.
September 5, 2010 at 6:50 pm
Textbox Properties --> Format --> Format Code: C
November 18, 2010 at 7:52 am
try this approach (copied from my report)- it's much simpler:
=Format(Fields!UnitPrice.Value,"C")
January 20, 2011 at 7:08 am
Did you ever get an answer on this..I'm have the save issue. The value returned is incorrect, but the formatting is fine...here is what I'm doing ....FormatCurrency(Fields!TotalOrderCost.Value.ToString(),0)
Viewing 15 posts - 1 through 15 (of 16 total)
You must be logged in to reply to this topic. Login to reply