User`s guide

11.6.1 Conditional on or off properties
A conditional on or off property tests to see if a condition has been met. It is on if the condition is met,
off if the condition is not met. There is no middle ground. Use Boolean formulas for this kind of formatting.
Crystal syntax example
condition
Basic syntax example
formula = condition
The program tests each value to see if it meets the condition and it returns a "yes" or "no" answer. It
then applies the property to every value that returns a "yes" answer.
11.6.2 Conditional attribute properties
A conditional attribute property tests to see which of two or more conditions is met. The program then
applies the formatting appropriate to the condition. For example, assume that you want values under
quota printed in red and all other values printed in black. The program tests to see whether the value
is under quota or not. If it is under quota, then it applies the red attribute; if it is not, then it applies the
black attribute.
Use an If-Then-Else formula for this kind of conditional formatting.
Crystal syntax example
If Condition A Then
crRed
Else
crBlack
Basic syntax example
If Condition A Then
formula = crRed
Else
formula = crBlack
End If
When conditional attribute properties are set up, Crystal Reports loads a selection of attributes into the
Functions list in the Formula Workshop. Double-click any of these attributes to add them to a formula.
For example, if you are setting horizontal alignment conditionally, the Functions list contains attributes
such as DefaultHorAligned, LeftAligned, and Justified. If you are setting borders conditionally, the
Functions list contains attributes such as NoLine, SingleLine, and DashedLine.
2012-03-14255
Formatting