|
Crystal Reports provides four formulas that you can use to force the evaluation of a processing block at a specific time. The four formulas are BeforeReadingRecords, WhileReadingRecords, WhilePrintingRecords, and EvaluateAfter. These can be found in the Execution Time category of the Function Tree in the Formula Editor.
BeforeReadingRecords Using this keyword phrase in a formula has the result of forcing the statements that follow it to execute before Crystal sends the query to the data source. This means that it is valid only on processing constant formulas that do not reference anything else. You might use this formula to force Crystal to calculate a value on a parameterized field in your report to ask the user for a value before fetching records from the database.
WhileReadingRecords The WhileReadingRecords formula is used as the first statement in a group of formula statements in order to force them to be evaluated during Pass 1 by the processing engine. You might use this statement to populate an array with record data during the reading of records from the database.
WhilePrintingRecords Use this formula statement to force a group of statements to execute during Pass 2, which is after the data is retrieved from the data source. You might use this formula when you need to share data across sections of a report or when accumulating values in a variable based on data stored in a field.
EvaluateAfter() This function forces one formula statement to execute after the completion of another. Use this function when the value of one formula depends on the presence and value of another formula. The parameter to the EvaluationAfter function is the name of another function; e.g., EvaluateAfter(CalculateSalesSaturation).
Use of content on this site is expressly subject to the restrictions set forth in the Membership Agreement | |
Conello © 2000-2003 Feedback |