Solved

# Is there a RoundUp function in Crystal Reports?

Posted on 2007-04-03
1,612 Views
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?

0
Question by:printmedia
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 6
• 3

Author Comment

ID: 18845699
By the way I want to Round to 2 decimal places.
0

LVL 13

Expert Comment

ID: 18845727
can you please post an example;

gary
0

Author Comment

ID: 18845815

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

LVL 100

Expert Comment

ID: 18845981
Try this

Round({YourNumber} + .005, 2)

mlmcc
0

Author Comment

ID: 18846099
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

Author Comment

ID: 18846128
I did something like this:

if Number= 0 then
formula = 0

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

end if

----------------
Does that look right?
0

Author Comment

ID: 18846200
Now I noticed a problem, when the number is 9.4500 it rounds it to 9.46 when it should be 9.45
0

LVL 100

Accepted Solution

mlmcc earned 500 total points
ID: 18846260
Try
Round( Number + .0049, 2)

mlmcc
0

Author Comment

ID: 18846434
worked great!
0

LVL 100

Expert Comment

ID: 18847606

mlmcc
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater â€¦
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearlyâ€¦
Nobody understands Phishing better than an anti-spam company. Thatâ€™s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With companâ€¦
Why Skyport?
###### Suggested Courses
Course of the Month5 days, 15 hours left to enroll