[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Format value to display dollar amount in SSRS 2005

Posted on 2013-01-28
5
Medium Priority
?
2,160 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

In this short article I will be talking about two functions in the SQL Server Reporting Services (SSRS) function stack.  Those functions are IIF() and Switch().  And I'll be showing you how easy it is to add an Else part to the Switch function. T…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

656 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