This is a migrated thread and some comments may be shown as answers.

Round to a certain decimal point

3 Answers 1709 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Austin
Top achievements
Rank 1
Austin asked on 26 Mar 2013, 09:12 PM
Hey guys, I was wondering if there is a expression to round to a certain decimal point(EG. 11.9789 -> $11.98). I know with SQL reporting there is a Round(number,2) which solved this problem. 

Any help would be appreciated. Thanks

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 27 Mar 2013, 01:07 PM
Hi Austin,

You can easily format the display of the number in a textbox by using the Format property in the property grid.

If you need to round your number when you are using it in expression you have two options - round it in the sql query or write your own user function that will return the rounded number. For more information about user functions please check this help article.

Kind regards,
IvanY
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

0
Divya
Top achievements
Rank 1
answered on 10 Apr 2014, 08:12 AM
cross tab report by passing parameters in dynamic parameters through design after clicking the button then show the report like below
0
Stef
Telerik team
answered on 15 Apr 2014, 07:34 AM
Hello Divya,

If your question is related to rounding numbers, this is my post in your support ticket on the same topic:

"The Round built-in function expects only one parameter and returns the nearest Integer number. If you need to format(round) a number to a specific place in it, you can use the TextBox.Format property and specify a Number format through the Format Builder Dialog.

You can use also user function and implement custom logic to round and format the value of the item.
"

About configuring data retrieval methods with parameters mapped to report, parameters, please check for instance the steps in the SqlDataSource Wizard help article. Note that the Design Time values are used just to retrieve the data scheme, and the actually passed values are those set for the corresponding report parameters.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Austin
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Divya
Top achievements
Rank 1
Stef
Telerik team
Share this question
or