phone: (540)338-0194


 Crystal Reports formula examples

Conditional Total using a Running Total:

Another way to create a conditional total is to use a Crystal Running Total field, available in versions 7 and 8.   When you create a running total you have the option of determining how often the value 'evaluates'.   Usually this is used to have a running total evaluate only once per group, eliminating duplicates.  However there is also an option to specify a Boolean formula as the condition of evaluation.

You would create the running total selecting the appropriate field and operation.  For the 'evaluate' setting you would select the last option, 'formula'.  The square button will load a formula editor.  Here you can place your Boolean condition.  You don't need the If-Then syntax, just a straight boolean like:

 {Customer.Region}  = 'VA'
Crystal will only accumulate on records that meet this criteria.