Crystal Reports Training by Ken Hamady, MS, Reporting and Training Nationwide On Location Training Public Classes Individual Training Introductory Course Outline Advanced Course Outline Formula Examples Newsletter Back Issues My Blog Resource Library Consulting Services Support Services Contact Information Links to third party products Back to main page My Credentials
Free Crystal Reports formula examples from KenHamady.com


To learn the techniques used in these formulas get:


The Expert's Guide to Crystal Reports Formulas
and
 Expert Techniques for Crystal Reports I, II & III

PDF exPLODE

Rounding to the nearest 5 cents (or other odd increment):

Rounding to the nearest penny, dime, dollar or thousand dollars is simply a matter of using the round function and specifying the correct number of decimals.  Recently a reader sent me a formula that was supposed to round to the nearest nickel.  The formula didn't work and seemed too complex to fix, so I wrote my own formula and sharee it with my newsletter readers.   As soon as I did, one of my readers gave me an even simpler version.  Here it is and thanks to Mike Barron who told me that he found this formula long ago on an Excel forum

What I like most about this approach, other than the sheer simplicity, is that you could replace the ".05" with any odd increment and the rounding will be based on that increment. 



    Round ( {database.field} / .05 , 0 ) * .05