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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding up for every number 1

Status
Not open for further replies.

DJWheezyWeez

Technical User
Joined
Jun 5, 2008
Messages
265
Location
US
I'm trying to round every decimal number up to the next whole number. With a number like 42.82, that rounds up to 43 fine but I also need a number like 30.27 to round up to 31. Is this already built into CR somewhere or will I need a formula?

I'm using CR XI.

-DJWW
 
i think this would have to be a formula.
perhaps something like this?

//{@roundup}
if {table.number} > floor({table.number})
then floor({table.number})+1
else {table.number}
 
Thanks that worked out well. I also found another way I believe to be easier. There's a function called RoundUp which can do the work for you. My formula looked like this:

RoundUp({table.number}, 0)

The 0 is the number of decimals you want.

Hope this helps anyone else with this problem.

-DJWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top