Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

removing decimals in crystal reports for number field

I have a field year which is string type coming from db side.So I converted that to number and adding 1 more year to that to show like this:

 Year:2014-2015

Below is the formula.

'Year' & ':' & tonumber({FocusOnCustomer.YEAR})&'-'&(tonumber({FocusOnCustomer.YEAR})+1)

Everything is working fine in designer.But when I view the report in cr viewer I am getting data like this.

2,014.00-2,015.00

I want to remove decimals and comas

like image 433
vissubabu Avatar asked May 12 '14 12:05

vissubabu


2 Answers

Try:

ToText( ToNumber({FocusOnCustomer.YEAR}), "#")
like image 92
craig Avatar answered Nov 23 '22 17:11

craig


Right-click on the field or formula Select Format Field On the Number tab, choose the format to use from the list or click Customize to create a custom format. Click OK

enter image description here

Website Link

like image 40
Abdul Khaliq Avatar answered Nov 23 '22 17:11

Abdul Khaliq