Home » Developer & Programmer » Reports & Discoverer » How to kill a Report Job ID (Dev. 10g)
How to kill a Report Job ID [message #514764] Wed, 06 July 2011 06:49 Go to next message
oralover2006
Messages: 119
Registered: January 2010
Location: India
Senior Member
hi all,

i used below code to call Report from Form

Function to call procedure to run report:

DECLARE
  report_id Report_Object;
  v_report_other VARCHAR2(4000);
  vc_connect varchar2(50);
BEGIN
  --Call run_report_object 
  report_id:= find_report_object('M_LIST');
  v_report_other:= 'paramform=no';
  vc_connect	:= 'uname/pass@mycntstr';
  RUN_REPORT_OBJECT_PROC(vc_connect,
                         report_id,
                         :GLOBAL.MAIN_DIR||'m_list.rdf',
                         v_report_other,
                         'http://mmm.srv.com:80/reports/rwservlet');
END;

-- 

PROCEDURE RUN_REPORT_OBJECT_PROC (vc_connect varchar2,
                                  report_id REPORT_OBJECT,
                                  report_file_name varchar2,
                                  report_otherparam varchar2,
                                  reports_servlet varchar2
) IS
 report_message VARCHAR2(100) := '';
 rep_status VARCHAR2(100) := '';
 vjob_id VARCHAR2(4000) := '';
 hidden_action VARCHAR2(2000) := '';
 v_report_other VARCHAR2(4000) := '';
 i number (5);
 c char;
 c_old char;
 c_new char;
 sso_user VARCHAR2(100);
 --
 report_server_name VARCHAR2(100) := 'my_rep_srvr';
BEGIN
	:global.rep_success:='N';
  -- setting Reports runtime parameters
  SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
  SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,report_file_name);
  SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,report_server_name);
  SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,CACHE);
  SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,'PDF');
  -- creating string for pfaction parameter
  hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);
  hidden_action := hidden_action ||'&destype='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);
  hidden_action := hidden_action ||'&desformat='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT);
  --
  hidden_action := hidden_action||'&ssoconn='||vc_connect; 
  --
  c_old := '@';
  FOR i IN 1..LENGTH(report_otherparam) LOOP
      c_new:= substr(report_otherparam,i,1);
      IF (c_new =' ') THEN
         c := '&';
      ELSE
         c := c_new;
      END IF;
      -- eliminate multiple blanks
      IF (c_old = ' ' and c_new = ' ') THEN
         null;
      ELSE
         v_report_other := v_report_other||c;
      END IF;
      -- save current value as old value
      c_old := c_new;
  END LOOP;
  --
  hidden_action := hidden_action ||'&'||v_report_other;
  hidden_action := reports_servlet||'?_hidden_server='||report_server_name||hidden_action;
  -- Set pfaction to the report
  SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||report_otherparam);
  report_message:= run_report_object(report_id);
  rep_status := report_object_status(report_message);
  IF rep_status='FINISHED' THEN
     vjob_id := substr(report_message,length(report_server_name)+2,length(report_message));
     WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
_blank');
  ELSE
     --handle errors
     message (rep_status||' - '||report_file_name||' Report output aborted', Acknowledge);
  END IF;

END;


its showing report output in a new window, but problem is that if i copy the url, then close current report browser window, start new IE session and paste the copied url it showing the same report... but i don't want to allow this and want to Kill the current job id ( while it displaying the same report ), how i can do this?

kindly help Smile
Re: How to kill a Report Job ID [message #517034 is a reply to message #514764] Thu, 21 July 2011 23:54 Go to previous message
oralover2006
Messages: 119
Registered: January 2010
Location: India
Senior Member
no hope ? Sad
Previous Topic: Location of .bmp of image in report
Next Topic: Analyzing Reports complexity / find particular function in reports
Goto Forum:
  


Current Time: Sat Nov 22 22:04:08 CST 2014

Total time taken to generate the page: 0.10411 seconds