Monday, October 3, 2011

Oracle Reports background engine stopping


In Forms 6i when a report is run, a background process called Reports Background Engine is created. Sometimes we want  this process to be terminated automatically when a report is completed and we exit from report.

Here is the PL/SQL code for this:

DECLARE
  pl_id ParamList;
BEGIN
  pl_id := Create_Parameter_List('dummy');
  Add_Parameter(pl_id,'ORACLE_SHUTDOWN',TEXT_PARAMETER,'Yes');
  Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
  Run_product(REPORTS,'<>',SYNCHRONOUS,     RUNTIME,FILESYSTEM,pl_id,NULL);
END;