/* If the salary is 2000, this function sets the
** following attributes: border width to 1, foreground
** border color to "red," background border color
** to "blue," border pattern to "checker," foreground
** fill color to "yellow," background fill color to
** "green," and the fill pattern to "crisscross."
**
** Note: When you run the report with this PL/SQL
** construct in character mode, only the border width
** (of 1) and fill pattern (of solid) will be set;
** all other settings will be ignored. When you run
** the report with this PL/SQL construct in bitmap,
** all of the attributes will be set. (Be aware that
** the border background color cannot be set on some
** GUIs.)
*/
function F_SALFormatTrigger return boolean is
begin
if :sal = 2000 then
srw.attr.mask := SRW.BORDERWIDTH_ATTR +
SRW.FBCOLOR_ATTR +
SRW.BBCOLOR_ATTR +
SRW.BORDPATT_ATTR +
SRW.FFCOLOR_ATTR +
SRW.BFCOLOR_ATTR +
SRW.FILLPATT_ATTR;
srw.attr.borderwidth := 1;
srw.attr.fbcolor := 'red';
srw.attr.bbcolor := 'blue';
srw.attr.bordpatt := 'checker';
srw.attr.ffcolor := 'yellow';
srw.attr.bfcolor := 'green';
srw.attr.fillpatt := 'crisscross';
srw.set_attr (0, srw.attr);
end if;
RETURN(TRUE);
end;