Home » Developer & Programmer » Reports & Discoverer » How to catch Exact error from Report in calling Forms ( Dev.10g ) (Oracle DB 11g, Oracle Reports 10g, Windows 7)
How to catch Exact error from Report in calling Forms ( Dev.10g ) [message #626301] Fri, 24 October 2014 06:25
oralover2006
Messages: 144
Registered: January 2010
Location: India
Senior Member
hi all,

tried to search for it but failed here and on google.

below is the code to call / run report from Forms 10g, I want to ask if an error occured in report, how i can catch it the Exact Error? normally getting " Unable to run report "

please help.

Declare 
  khan      REPORT_OBJECT;    
  v_rep      VARCHAR2(100);  
  rep_status VARCHAR2(50);  
  vc_connect varchar2(50);
  
BEGIN  
  khan := find_report_object('DAILY_TRANS'); 
  vc_connect := :global.zero5||'/'||:global.zero6;  
  -- 	
  SET_REPORT_OBJECT_PROPERTY(khan,REPORT_FILENAME,:global.rep_path||'/daily_trans_rep.rdf');
  SET_REPORT_OBJECT_PROPERTY(khan,REPORT_EXECUTION_MODE,BATCH);  
  SET_REPORT_OBJECT_PROPERTY(khan,REPORT_COMM_MODE,SYNCHRONOUS); 
  SET_REPORT_OBJECT_PROPERTY(khan,REPORT_DESTYPE,CACHE); 
  SET_REPORT_OBJECT_PROPERTY(khan,REPORT_DESFORMAT,'PDF');
  SET_REPORT_OBJECT_PROPERTY(khan,REPORT_SERVER,'rep_bravo'); 
  SET_REPORT_OBJECT_PROPERTY(khan,REPORT_OTHER,'paramform=no from_member='||:f_mem_code||
                                               ' to_member='||:t_mem_code||
                                               ' from_date='||to_char(:f_date,'DD-MON-RRRR')||
                                               ' to_date='||to_char(:t_date,'DD-MON-RRRR')||
                                               ' e_l='||:status)||
                                               ' P_SERVERNAME=rep_bravo P_ACTION=http://me.mediatest.in:80/reports/rwservlet?');

  v_rep := RUN_REPORT_OBJECT(khan);

  rep_status := REPORT_OBJECT_STATUS(v_rep);
  
  WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
      rep_status := report_object_status(v_rep);
    END LOOP;
    
  IF rep_status = 'FINISHED' THEN 
      WEB.SHOW_DOCUMENT('http://me.mediatest.in:80/reports/rwservlet/getjobid'||
          substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rep_bravo','_blank');
      WEB.SHOW_DOCUMENT('http://me.mediatest.in:80/reports/rwservlet/killjobid'||
          substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rep_bravo','_blank');
  ELSE  
    message('Error while running report '|| rep_status, Acknowledge);   
  END IF; 

END;


regards
.

Edit: Found this link but in last post still no answer for the solution'
Link: http://www.orafaq.com/forum/t/125571/

.

[Updated on: Fri, 24 October 2014 08:31]

Report message to a moderator

Previous Topic: how to write exception code in the formula column
Next Topic: create a simple report
Goto Forum:
  


Current Time: Sun Jul 12 21:56:51 CDT 2020