Designing reports using BIRT Studio : Editing and formatting report content : Formatting data based on conditions : Specifying a condition : Comparing to a value in another column
 
Comparing to a value in another column
In a conditional expression, you can compare the values of one column with the values of another column. For example, in a report that displays products, sales prices, and MSRP (Manufacturer Suggested Retail Price), you can create a conditional formatting rule that compares the sale price and MSRP of each product and highlight the names of the products whose sales price is greater than the MSRP. Figure 2‑15 shows a condition comparing the sale price value with the MSRP value. If the sale price value is greater, the product name appears in bold.
Figure 2‑15 Creating a rule that compares values in two columns
How to compare to a value in another column
1 On Conditional Formatting, choose Change Value.
2 On Value, select Use value from data field. A list of columns used in the report appears.
3 Select a column from the list, then choose OK. Conditional Formatting displays the column name in the comparison value field.
Figure 2‑16 shows the report design with conditional formatting applied.
Figure 2‑16 A report design with conditional formatting