Link to home
Start Free TrialLog in
Avatar of shobhitdixit
shobhitdixit

asked on

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.
Avatar of rettiseert
rettiseert

VB has the FormatNumber fucntion:

FormatNumber(1.545,2)

will round 1.545 to two decimal places
SQL Server has a round function ROUND(FieldName, 2) 2 being to two decimal places.
ASKER CERTIFIED SOLUTION
Avatar of brejk
brejk
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shobhitdixit

ASKER

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.
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
I don't know how to achieve this:


I want something like this:

1234.56
1235
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
All the solutions were correct. N0 worked for me.

Thank you all for your valuable time.