FLOOR in Crystal Report

CR 9

i need to round down to the nearest whole number.  how can i do this?

LVL 44
zephyr_hex (Megan)DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

musalmanERP ConsultantCommented:
If your field is numeric, Right Click the Field and Click Format Field > Click Customize > Click Rounding Drop Down and then select what level you want :)
CR XI has the FLOOR function.  Is it not in CR9?

Here is one method

Round({yourNumber} - 0.5)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ANother idea is there a Trunc or Truncate in CR9?

Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

zephyr_hex (Megan)DeveloperAuthor Commented:
@musalman: this can not be a format as i need to use the result in a calculation.

@mlmcc: CR 9 does not seem to have FLOOR() ... i get an error when i try to use it.  i will try your suggestions, and check for a truncate function.

 CR 10 doesn't have Floor either.  They must have added it in CR XI.


 CR 10 has Truncate (aka Fix) and Int.  They both just drop the decimals completely.  For example, 1.999 becomes 1.  But Truncate and Int handle negative numbers differently.  For example, Truncate (-10.2) gives you -10, while Int (-10.2) gives you -11.

musalmanERP ConsultantCommented:
Another good function that may help you , (If Exists in CR 9) is Fix().
It Returns a truncated value.

Fix (number), Fix (number, #places)

zephyr_hex (Megan)DeveloperAuthor Commented:
i do not expect to encounter negative numbers.
Round({yourNumber} - 0.5)
all seem to do the job.

You're welcome.  Glad I could help.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.