Creating multiple formatting rules
You can create multiple formatting rules for an element. For example, you can create three rules to set the values of an order total data element to one of three colors, depending on the dollar amount.
Figure 8‑22 shows an example.
Figure 8‑22 Highlights page showing multiple format rules for an element
You can create any number of rules, and you can base conditions on the value of the selected element or on the value of other elements. Using the previous example, you can also change the color of the order total value based on the value of another data element, such as order ID.
Figure 8‑23 shows this example.
Figure 8‑23 Conditional format for orderTotal based on the value of orderID
For each row of data, BIRT Report Designer evaluates the rules in the order in which they appear in the list of rules. As it evaluates each rule, BIRT Report Designer applies the specified format properties if the condition is met. If multiple rules with different conditions use the same format property, the later rule can override the format that the earlier rules specify.
Consider the following example:

The first rule sets order total values to red if they are less than 100000.

The fourth rule sets order total values to blue if the order ID is larger than 1090.
If an order total value is 50000 and the order ID is 2000 (the conditions in both rules are true), the order total value appears in blue, not red, because the fourth rule supersedes all rules before it. If, however, the fourth rule sets order total values to italics rather than to blue, the value appears in red and italics.
When creating multiple rules for an element, plan the rules carefully. Consider the effect of individual rules and how the order of the rules changes the results. Test thoroughly to verify that the report displays the results that you expect. If necessary, change the order of the rules by selecting a rule and moving it up or down the list using the Move Up or Move Down buttons on the Highlights page.