Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

7.07 The Highlighting Expert

Use the Highlighting Expert?

The Highlighting Expert is a simplified version of the Format Editor. It gives you a wizard interface for creating rules that modify the font and border of a field. Figure 7-10 shows an example of using the Highlighting Expert for drawing a double box border around a field when its value is equal to “USA”. The Sample column shows the result of what the field looks like after the rule has been applied. The Condition column shows the rule that is being applied. There can be multiple rules applied.



Figure 7-10. The Highlighting Expert window.

I don’t recommend using the Highlighting Expert. There are two reasons for this. The primary reason is that it can create confusion when maintaining a report. There are now two places where the formatting of an object can be modified. If you inherited this report from another programmer and you want to determine if a field is going to have its format modified, you have to check the Format Editor and the Highlighting Expert. For a large report, this adds additional work. The second reason is that the rules in the Highlighting Expert always override the rules in the Format Editor. For example, if you create a formula in the Format Editor for the font and also use the Highlight Expert to modify the font, the formula is ignored and only the Highlighting Expert is used. This is most likely to happen when inheriting a report from another programmer who used the Highlighting Expert. You might add a formula with the Format Editor and spend a lot of time trying to debug it. But you won’t be able to fix it until you remember to check the Highlighting Expert. All in all, this tool has the potential to do more harm than good.

The Highlighting Expert was originally designed as an easy way for end users to modify the format of a field without having to know how to program. It let them create formulas by pointing and clicking. Once an end user felt comfortable with programming logic, they would graduate to adding formulas with the Format Editor. As a .NET programmer, programming is what you do and you don’t have to rely on a simplified tool for assistance. I recommend that you ignore it altogether and keep all the functionality within the Format Editor.