Solved

Format value to display dollar amount in SSRS 2005

Posted on 2013-01-28
5
1,985 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 65

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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