• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1828
  • Last Modified:

Rounding off values

I am working on SSRS-2005. This must be easy for wiz, how do you round off values corrected to two decimal places in reporting services?
Is there a VB expression which i can write on format>fx tab  in the value fields.
0
shobhitdixit
Asked:
shobhitdixit
2 Solutions
 
rettiseertCommented:
VB has the FormatNumber fucntion:

FormatNumber(1.545,2)

will round 1.545 to two decimal places
0
 
digital_thoughtsCommented:
SQL Server has a round function ROUND(FieldName, 2) 2 being to two decimal places.
0
 
brejkCommented:
In Report Designer in Visual Studio being in Layout tab select the field (or multiple fields) for which you want to make round off. In Properties window go to Format property and set its value to N2 (or C2 if you want currency).
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
shobhitdixitAuthor Commented:
In Report Designer in Visual Studio being in Layout tab select the field (or multiple fields) for which you want to make round off. In Properties window go to Format property and set its value to N2 (or C2 if you want currency).
--Brejk

Thank you all for your quick response. But how do i round to the nearest value.
0
 
brejkCommented:
Well, I tried - if you set the Value property of the field to:

=CDec(<put_the_number_here>)

and then you set the Format property of the same field to N2 the number will be rounded.

Example: 123.1250 -> will be rounded to 123.13
0
 
shobhitdixitAuthor Commented:
I don't know how to achieve this:


I want something like this:

1234.56
1235
0
 
PFrogCommented:
In the report, set the format property of the textbox to 0

You can also display 1,235 by using the format #,##0

Or 1235.6 by using the format 0.0
0
 
shobhitdixitAuthor Commented:
All the solutions were correct. N0 worked for me.

Thank you all for your valuable time.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now