Highlighting a value Highlighting a row

How To... 4-75 Topics Oracle CDE1 color palette, Default color palette, and Grayscale color palette in the Reference Color and Pattern Palettes section of the Oracle Reports online Help.

4.9.6.6 Importing or exporting a color palette

To import or export a color palette:

1. First, make the color palette editable:

■ Choose Edit Preferences, and set Color Mode to Editable, as described in Section 4.2.6, Setting color palette preferences . ■ Shut down and restart Oracle Reports Builder to enable the Editable mode.

2. In the Paper Layout view, choose Format Color Palette Import or Format

Color Palette Export .

3. In the dialog box, specify the name and format of the file.

4. Click OK.

See also Section 2.4.5, About changing colors and patterns Topics Oracle CDE1 color palette, Default color palette, and Grayscale color palette in the Reference Color and Pattern Palettes section of the Oracle Reports online Help.

4.9.6.7 Highlighting a value

To highlight a value in a report: 1. In the Paper Layout view or Paper Design view, click the field that contains the value to be highlighted.

2. Choose Format Conditional Formatting.

3. In the Conditional Formatting dialog box, click New to display the Format

Exception dialog box. 4. Select the field and define the conditions when the value should be highlighted.

5. In the Format group box, select the Fill Color to be used to highlight the value.

6. Click OK to close the Format Exception dialog box, then click OK again to close

the Conditional Formatting dialog box. If the code compiles without errors, the new formatting is reflected in the Paper Layout view. The code is stored as a format trigger for the field. Note: By default, color palettes are read-only. Note: A report can have only one color palette. Note: If you cant select the condition you want to use in the dialog box, select the formatting you want and a placeholder condition. The condition can be edited in the PLSQL Editor for the format trigger that is created. 4-76 Oracle Reports Users Guide to Building Reports Example The following code determines the monthly compensation and changes the background color to red if the compensation has exceeded four thousand dollars a month and the employee is not a manager. function R_G_EMPNOFormatTrigger return boolean is varcomm number; begin if :comm is null then varcomm := 0; else varcomm := :comm; end if; if :sal 2 + varcomm 4000 and :job = MANAGER then srw.set_background_fill_colorred; end if; return TRUE; end; See also Section 2.1.6, About conditional formatting Section 4.9.1.5, Applying conditional formatting to a layout object

4.9.6.8 Highlighting a row

To highlight an entire row:

1. In the Paper Layout view, click the repeating frame that contains the fields that

make up the rows to be highlighted.

2. Choose Format Conditional Formatting.

3. In the Conditional Formatting dialog box, click New to display the Format

Exception dialog box.

4. Select the fields and define the conditions that describe the rows to be

highlighted.

5. In the Format group box, select the Fill Color to be used to highlight the row.

6. Click OK to close the Format Exception dialog box, then click OK again to close

the Conditional Formatting dialog box. If the code compiles without errors, the new formatting is reflected in the Paper Layout view. The code is stored as a format trigger for the repeating frame. Example The following code determines the monthly compensation and changes the background color to red if the compensation has exceeded four thousand dollars a month and the employee is not a manager. function R_G_EMPNOFormatTrigger return boolean is varcomm number; begin if :comm is null then varcomm := 0; Note: If you cant select the condition you want to use in the dialog box, select the formatting you want and a placeholder condition. The condition can be edited in the PLSQL Editor for the format trigger that is created. How To... 4-77 else varcomm := :comm; end if; if :sal 2 + varcomm 4000 and :job = MANAGER then srw.set_background_fill_colorred; end if; return TRUE; end; See also Section 2.1.6, About conditional formatting Section 4.9.1.5, Applying conditional formatting to a layout object

4.9.6.9 Alternating row colors