Solved

Is there a RoundUp function in Crystal Reports?

Posted on 2007-04-03
10
1,184 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
  • 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
 
LVL 100

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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 100

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 100

Expert Comment

by:mlmcc
ID: 18847606
Glad i could help

mlmcc
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now