Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Round up in Crystal 10 1

Status
Not open for further replies.

Woodyuk

IS-IT--Management
Aug 22, 2003
59
GB
Hello

Im trying to get a figure to round up on a report im doing. The number is worked out by another sum, which I just look at in another field. I want to round this up to the nearest 0.5 for example:
1.23 would round up to 1.50
1.01 would round up to 1.50
1.99 would round up to 2.00
4.45 would round up to 4.50 and so on

Ive had a look through the posts on here, and nothing seems to help.

Can you?
 
Roundup() is a function in Crystal starting with version XI, I believe. However you can get the effect of roundup() with a little work. Ken Hamady has a formula dealing with this posted on his website ( but it seems to be down at the moment.

However try his website a bit later and I am sure you will find the formula you need.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Thanks I will tak a look. Yes I know about the round function but that rounds down if it was ( for example) 2.2 it would go to 2, I need it to say 2.5
 
I think this is what you are looking for:

-int(-({table.field}/.5))*.5

~Brian
 
I actually think ive almost worked it out.
i did
round ({tablefield}/5,1) *5

I tried yours and got a negative answer, so will still play around with my one.

If anyone else knows this to be right or a better way please say
 
Right Im being a wally. Brain your way works mine does not.
Many thanks for your help vote on its way for you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top