22.3 Add Conditional Formatting to the Report

The steps in this section will show you how to add conditional formatting so that salaries greater than or equal to $10,000 will be highlighted in bold, red text, and salaries between $4,999 and $10,000 will be highlighted in bold text.

Since the data retrieved cannot be both greater than or equal to $10,000 and between $4,999 and $10,000, you will need to create two separate format exceptions. In this section, you will see how to create each distinct format exception.

To add conditional formatting:

  1. In the Paper Design view, right-click the Salary column of data (not the Salary column heading), then choose Conditional Formatting.

  2. In the Conditional Formatting dialog box, click New to create a new Format Exception.

  3. In the Format Exception dialog box, make sure SALARY is selected.

  4. Next to SALARY, choose Greater Than or Equal from the list.

  5. In the next box, type 10000.

  6. Under Format, click the icon next to Text Color to display the color palette.

    Note:

    You can choose as many options as you want in the Format Exception dialog box, such as text color, style, and font.
  7. Click Red.

  8. Click Font, then choose Bold.

  9. Click OK to accept the new font style.

    You should now see the following options selected in the Format Exception dialog box:

    Figure 22-5 Format Exception dialog box

    Description of Figure 22-5 follows
    Description of "Figure 22-5 Format Exception dialog box"

  10. Click OK.

  11. In the Conditional Formatting dialog box, click New to create your second format exception.

  12. Create a format exception where the values of the SALARY column are between $4999 and $10000 are highlighted in bold.

    Note:

    Make sure you type the values in the order described, so that Reports Builder knows to highlight the data between $4999 and $10000, and not $10000 and $4999.
  13. When you are done, click OK. The Conditional Formatting dialog box should now look like the following:

    Figure 22-6 Conditional Formatting dialog box

    Description of Figure 22-6 follows
    Description of "Figure 22-6 Conditional Formatting dialog box"

  14. Click Apply, then click OK. Your report displays in the Paper Design view, and should now look something like this:

    Figure 22-7 FInal Conditional Formatting report

    Description of Figure 22-7 follows
    Description of "Figure 22-7 FInal Conditional Formatting report"

  15. Save your report as condhigh_your_initials.rdf.