Link to home
Start Free TrialLog in
Avatar of incendius
incendius

asked on

Possible to round up in Crystal Reports when the number isn't > 5???

Ok I am completely stumped. I have a bunch of fields that need to br rounded to the nearest whole number, even when they are less than... meaning:

1.45
1.76
3.06
5.25

I need ANY numbers who has ANYTHING in the tenths/hundredths to be rounded UP.
So basically what I want to acheive is:

2
2
4
6

This is because the numbers represent a piece of material to be used. If it calls for "3.06", we need to use 4 to get the job done. The current formula is:

{@SumTotal} + ( {@SumTotal} * ({tbl Material.Waste} / 100 ) )

Is this possible to do? Can I round up anything in .xx to the next whole number?

Much thanks in advance for your help!

ASKER CERTIFIED SOLUTION
Avatar of stasau
stasau

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of peter57r
Hello incendius,

I am assuming that you want to round your current formula.

int({@SumTotal} + ( {@SumTotal} * ({tbl Material.Waste} / 100 ) )+0.999)



Pete
Avatar of incendius
incendius

ASKER

OK ummm.. I tried both posible solutions and the code wanted to save with error each time.

{@SumTotal} + ( {@SumTotal} * ({tbl Material.Waste} / 100 ) )

^--- is what I have currently... any ideas on how to make your ideas work? I know basically nothing about CR.

Thanks!
incendius,

So was your formula working before?


Pete
Sweeet! Thanks for the help guys... Stasau's answer worked just right.

All I had to do was replace 'tblLengths.BoardLength' with '@SumTotal'.

Awesome.