printmedia
asked on
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.
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.
can you please post an example;
gary
gary
ASKER
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
Try this
Round({YourNumber} + .005, 2)
mlmcc
Round({YourNumber} + .005, 2)
mlmcc
ASKER
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?
In excel: Roundup(0,2) = 0
Any idea?
ASKER
I did something like this:
if Number= 0 then
formula = 0
else
formula = Round( Number + .005, 2)
end if
----------------
Does that look right?
if Number= 0 then
formula = 0
else
formula = Round( Number + .005, 2)
end if
----------------
Does that look right?
ASKER
Now I noticed a problem, when the number is 9.4500 it rounds it to 9.46 when it should be 9.45
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
worked great!
Glad i could help
mlmcc
mlmcc
ASKER