Thursday, September 6, 2012

Code to write in before report and after report trigger - Oracle Reports

Piece of code to write in before report trigger

function BeforeReport return boolean is
begin
  BEGIN
  SRW.USER_EXIT('FND SRWINIT');
  EXCEPTION WHEN SRW.USER_EXIT_FAILURE THEN
    SRW.MESSAGE (1000,'Failed in BEFORE REPORT trigger');
    return (FALSE);
  END;

  return (TRUE);
end;


Piece of code to write in after report trigger

function AfterReport return boolean is
begin
 BEGIN
  SRW.USER_EXIT('FND SRWEXIT');
 EXCEPTION
   when srw.user_exit_failure then
   srw.message(1,'Failed in AFTER REPORT TRIGGER');
   return (FALSE);
 END;
  return (TRUE);
end;