SRW.PROGRAM_ABORT
built-in exceptionThis exception stops the report execution and raises the following error message:
REP-1419: PL/SQL program aborted.
SRW.PROGRAM_ABORT
stops report execution when you raise it.
SRW.PROGRAM_ABORT;
You must raise the exception from within your PL/SQL.
Suppose you want to put a border around the salary if it is greater than 0.
Suppose, also, that if the report fetches a salary less than 0, you want to
raise a customized error message (that is, "FOUND A NEGATIVE SALARY. .
."), then terminate the report execution. To do so, you could write the
following format trigger for F_SAL
.
FUNCTION foo return boolean is
BEGIN
if :sal >= 0 then
SRW.ATTR.MASK := SRW.BORDERWIDTH_ATTR;
SRW.ATTR.BORDERWIDTH := 1;
SRW.SET_ATTR (0, srw.attr);
else
SRW.MESSAGE(100, 'FOUND A NEGATIVE SALARY.
CHECK THE EMP TABLE.');
raise SRW.PROGRAM_ABORT;
end if;
RETURN (TRUE);
END;
About the
Reports Builder built-in package (SRW
)
Copyright © 1984, 2005, Oracle. All rights reserved.