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.
Is there a VB expression which i can write on format>fx tab in the value fields.
SQL Server has a round function ROUND(FieldName, 2) 2 being to two decimal places.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
--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
=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
ASKER
I don't know how to achieve this:
I want something like this:
1234.56
1235
I want something like this:
1234.56
1235
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
All the solutions were correct. N0 worked for me.
Thank you all for your valuable time.
Thank you all for your valuable time.
FormatNumber(1.545,2)
will round 1.545 to two decimal places