Solved

Format value to display dollar amount in SSRS 2005

Posted on 2013-01-28
5
1,858 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
  • 2
  • 2
5 Comments
 
LVL 65

Expert Comment

by:Jim Horn
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Have you ever had to extract data from a Microsoft SQL Server database and export it to an Excel file, but did not want to use a DTS package? The concept in this article is not new, but it is the answer and will also work on 64-bit SQL boxes.   …
A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now