WhileReadingRecords and BeforeReadingRecords are rarely used in Crystal report writing in my experience.
In theory the BeforeReadingRecords evaluates a formula before the data is gathered....WhileReadingRecords by its name evaluates a formula as it reads the data???? how it does that is beyond me frankly. I have tried BeforeReadingRecords once or twice but never really got anything to work properly.
WhilePrintingRecords evaluates formulas at the time of printing the report and is very useful...while you will get some argument here about its value, I am a supporter of its constant use in formulas with the following exceptions:
1. Record selection formulas....for obvious reasons this is not valid
2. Formulas that do summary operations ... summing, averaging, min, max .... these are done before printing the report and you cannot use WhilePrintingRecords here
3. Formulas which are created for sorting or grouping purposes...again because these operations are required before the printing takes place.
BUT all other formulas including conditional formulas should have WhilePrintingRecords added....Why?
Without this function, you leave it up to Crystal to decide when to evaluate the formula....sometimes, especially if there are a lot of formulas in the report, Crystal does not evaluate the formula at the proper time, resulting in bad reported data.
By adding this function you FORCE Crystal to do the evaluation at the proper time.
With the exception of the previously mentioned formula types, it never hurts to add WhilePrintingRecords to your formulas and by doing so it often helps the timing of the formulas.
Jim Broadbent