Solved

Format value to display dollar amount in SSRS 2005

Posted on 2013-01-28
5
2,018 Views
Last Modified: 2013-01-29
My report displays the following value as a total:

1,706,027.00



The value is displayed in a text boxe with the value displayed as:

=formatnumber(sum(Fields!toproduce.Value*Fields!cost.Value))

I would like to display a dollar before the number so it appears like this:

$ 1,706,027.00
0
Comment
Question by:Sanjeet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 66

Expert Comment

by:Jim Horn
ID: 38828898
In your .rdl's design go to the textbox and do a Right Click:Text Box Properties.
Select Number on the left side, then Currency in Category, then 2 decimal places, then however you wish to display negative numbers.
0
 

Author Comment

by:Sanjeet
ID: 38829109
I am using visual studio 2005 Version 8. When I right click on the text box displaying the property for the numeric value I do not see the the property for number.
I am on the rdl of the report.

Is it located anywhere else?
0
 
LVL 6

Expert Comment

by:liija
ID: 38830031
You can also hardcode it with expression:

="$ " & CStr(Format(sum(Fields!toproduce.Value*Fields!cost.Value), "###,###,###.##"))

Combine dollar with your fields first formatted (Format) and then converted to character (CStr)
0
 

Author Comment

by:Sanjeet
ID: 38831182
When I use:

="$ " & CStr(Format(sum(Fields!productperpo.Value*Fields!cost.Value), "###,###,###.##"))

the decimals get removed eg:

$4,450

Also when I apply the same format to a different field:

=formatnumber(sum((cint(Fields!toproduce.Value)- Fields!productperpo.Value)*Fields!cost.Value))

it breaks.
0
 
LVL 6

Accepted Solution

by:
liija earned 500 total points
ID: 38831240
You're right - if your data doesn't have decimals.
The same you also get easier with
=Format(sum(Fields!productperpo.Value*Fields!cost.Value), "C")
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question