Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

7.03 Dynamic Fomatting

Dynamic Formatting with Formulas

Reports by their very nature are static. Although the printed data changes and the running totals are different every time, the report format stays the same. For example, if the first field in a column has a font of Arial and is black, every field in that column is also going to have a font of Arial and be black. After all, if every field in the same column had a different font, it would be very hard to read and people would question the abilities of the report designer. But, wouldn’t it be nice to use visual cues to highlight important data? For example, you could change the color of an inventory quantity to red when it is below the minimum. The reader immediately knows that the item needs to be reordered. There might even be a special note to the side of the report stating whom to notify. In this circumstance, making a report dynamic increases its usefulness to the reader without adding clutter.

Crystal Reports gives you the ability to use formulas that dynamically modify the visual properties of fields and sections on a report. For example, you can use a formula that returns either True or False with the Suppress property of a section to either show or hide a section. You could also use a formula that returns a string and this can be used to add a special message at the end of each row.