To highlight an entire row:
In the Paper Layout view, click the repeating frame that contains the fields that make up the rows to be highlighted.
Choose FormatConditional Formatting.
In the Conditional Formatting dialog box, click New to display the Format Exception dialog box.
Select the field(s) and define the condition(s) that describe the rows to be highlighted.
In the Format group box, select the Fill Color to be used to highlight the row.
Note: If you can't 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 PL/SQL Editor for the format trigger that is created.
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.
The following code determines the monthly compensation and changes the background color of the entire row 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_color('red');
end if;
return (TRUE);
end;
Applying conditional formatting to a layout object
Creating or editing a format trigger
The chapter "Building a Report with Conditional Highlighting" in
the Oracle Reports Building Reports manual, available on the Oracle
Technology Network Oracle Reports Documentation page (http://www.oracle.com/technology/documentation/reports.html
).
Copyright © 1984, 2005, Oracle. All rights reserved.