Skip to Content
Former Member
Jul 11, 2008 at 07:38 AM

Truncating a number with decimals


I have created a field {@years} with the value -10 which was used as part of a formula. This part has worked fine. I also wanted to use {@years} as part of the report heading where -10 represented a time period. However, the number came up as -10.00. I used the formula Truncate(Abs({@years})) but only the Abs part seemed to work. The number came up as 10.00 instead of 10.

Is there a problem with the formula I'm using or with Crystal Reports X or something else?