Solved

Is there a RoundUp function in Crystal Reports?

Posted on 2007-04-03
10
1,768 Views
Last Modified: 2010-05-18
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.
0
Comment
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
  • Learn & ask questions
  • 6
  • 3
10 Comments
 

Author Comment

by:printmedia
ID: 18845699
By the way I want to Round to 2 decimal places.
0
 
LVL 13

Expert Comment

by:crgary_tx
ID: 18845727
can you please post an example;

gary
0
 

Author Comment

by:printmedia
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 101

Expert Comment

by:mlmcc
ID: 18845981
Try this

Round({YourNumber} + .005, 2)

mlmcc
0
 

Author Comment

by:printmedia
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

by:printmedia
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

by:printmedia
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 101

Accepted Solution

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

mlmcc
0
 

Author Comment

by:printmedia
ID: 18846434
worked great!
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 18847606
Glad i could help

mlmcc
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question