A script-enabled browser is required for this page to function properly.

SRW.PROGRAM_ABORT built-in exception

This 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.

Syntax


SRW.PROGRAM_ABORT;

Usage notes

You must raise the exception from within your PL/SQL.

Example

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;

See also

About the Reports Builder built-in package (SRW)

SRW built-in package