Is there a RoundUp function in Crystal Reports?

Hi all.

I want to use the RoundUp function that is used in Excel (Rounds a number up, away from 0) in Crystal Reports, but it does not work.

Is there a similar function, if not, how do I get Crystal to round up?

Thank you in advance.
printmediaAsked:
Who is Participating?
 
mlmccConnect With a Mentor Commented:
Try
Round( Number + .0049, 2)

mlmcc
0
 
printmediaAuthor Commented:
By the way I want to Round to 2 decimal places.
0
 
crgary_txCommented:
can you please post an example;

gary
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
printmediaAuthor Commented:

The  function in excel is like this: Roundup(number, numberofDigitstoRound)

Roundup(0.1470, 2) = 0.15

Roundup(0.1838, 2) = 0.19

Roundup(2.1840, 2) = 2.19

Roundup(1, 2) = 1
0
 
mlmccCommented:
Try this

Round({YourNumber} + .005, 2)

mlmcc
0
 
printmediaAuthor Commented:
Thanks mlmcc, but when the following the number is 0 it rounds it up to 0.01 and it should be equal to 0.

In excel:  Roundup(0,2) = 0

Any idea?
0
 
printmediaAuthor Commented:
I did something like this:

if Number= 0 then
    formula = 0

else
formula = Round( Number + .005, 2)

end if


----------------
Does that look right?
0
 
printmediaAuthor Commented:
Now I noticed a problem, when the number is 9.4500 it rounds it to 9.46 when it should be 9.45
0
 
printmediaAuthor Commented:
worked great!
0
 
mlmccCommented:
Glad i could help

mlmcc
0
All Courses

From novice to tech pro — start learning today.