[askdba] Re: about run_report_object

  • From: drumil narayan <drumilnarayan@xxxxxxxxx>
  • To: askdba@xxxxxxxxxxxxx
  • Date: Sat, 15 Jan 2005 06:52:14 +0000 (GMT)

thanx ankur,

i put it in $oracle_home\reports\samples\demo, still
then the problem persists.. i am using 9ids under
windows..

what could be the probolem following is the procedure
am calling from my form to execute the report..

PROCEDURE run_report IS

report_id report_object;
report_job_id varchar2(200);
rep_status varchar2(200);
JOB_NUMBER number;
v_repserver varchar2(200):= 'OracleHome1Reports';
v_server varchar2(500):= 'repser90';
v_report varchar2(100):='INDENT_DOC.RDF';
v_port number := 80;
v_desformat varchar2(30):='pdf';
v_pl_id PARAMLIST;
v_pl_name VARCHAR2(20) := 'REPORT_PARAM_LIST';
al_id ALERT;
v_dummy NUMBER;

BEGIN

IF Set_Up_Parameter_List = 0 THEN 

report_id:=FIND_REPORT_OBJECT(v_report);

                   
IF get_application_property(USER_INTERFACE) = 'WEB'
THEN
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_EXECUTION_MODE,
RUNTIME); 
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,
ASYNCHRONOUS); 
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,
cache); 
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,v_desformat);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,v_repserver);
ELSE
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_EXECUTION_MODE,
RUNTIME); 
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,
ASYNCHRONOUS); 
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,
SCREEN); 
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,v_desformat);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,'');
END IF;

v_pl_id := get_parameter_list(v_pl_name);

--Find the report and then run it, passing the new
parameter list to it.
IF get_application_property(USER_INTERFACE) = 'WEB'
THEN
report_job_id:=RUN_REPORT_OBJECT(report_id, v_pl_id);
--debug_message('Report_job_id is'||report_job_id); 
ELSE
Run_Product(REPORTS, --product name
v_report, --module name
ASYNCHRONOUS, --communication mode
RUNTIME, --execution mode
FILESYSTEM, --location
v_pl_id, --parameter list
null); 
END IF;

-- Check to see if the report is going to be run
against the web
IF get_application_property(USER_INTERFACE)='WEB' THEN
rep_status:=REPORT_OBJECT_STATUS(report_job_id);
--debug_message('Rep_status is '||rep_status);
-- Dynamically Set the Job Number
JOB_NUMBER := length(v_repserver) + 2; 
WHILE rep_status in
('RUNNING','OPENING_REPORT','ENQUEUED', null)
LOOP
rep_status:=REPORT_OBJECT_STATUS(report_job_id);
END LOOP;
IF rep_status='FINISHED' THEN
Web.Show_Document('http://' || v_server || ':' ||
v_port ||'/dev60cgi/rwcgi60.exe/getjobid=' ||substr
(report_job_id,JOB_NUMBER)||'?server='||v_repserver,'_blank');
ELSE
message('Report failed with error message
'||rep_status);
END IF; -- end of checking report status
END IF; -- end of checking to see if report is running
on web.
END IF; -- end of checking parameter list set up ok

EXCEPTION
WHEN OTHERS THEN
al_id := FIND_ALERT('REPORT_PROBLEM');
SET_ALERT_PROPERTY(al_id, TITLE, 'Failed to run
report!');
SET_ALERT_PROPERTY(al_id, ALERT_MESSAGE_TEXT,
ERROR_TYPE||'-'||TO_CHAR(ERROR_CODE)||':
'||ERROR_TEXT);
v_dummy := SHOW_ALERT(al_id);
-- shows error dialog box
DISPLAY_ERROR;
RAISE FORM_TRIGGER_FAILURE;
END;

 --- Ankur Shah <ankur_ora@xxxxxxxxxxx> wrote: 
> Yes...id u are running rservlet...need to have
> reports ( rdf , rep , jsp )
> to be loaded at
> $ORACLE_REPORTSHOME/reports/samples/demo
> 
> > This is true for 10gAS ( 9.0.4 ) REPORT Server
> 
> ==========
> 
> HTHU
> 
> Ankur Shah
> Oracle DBA/ASA
> DHR-GA
> 
> 
> 
> ----- Original Message -----
> From: "drumil narayan" <drumilnarayan@xxxxxxxxx>
> To: <askdba@xxxxxxxxxxxxx>
> Sent: Friday, January 14, 2005 9:17 AM
> Subject: [askdba] about run_report_object
> 
> 
> > hello all am facing typical problem in built in
> > run_report_object built in,
> >
> > its not finding any thing, are we supposed to keep
> teh
> > rdf, rep in some sepcified locations..
> >
> > please help..drumil
> >
> >
>
________________________________________________________________________
> > Yahoo! India Matrimony: Find your life partner
> online
> > Go to: http://yahoo.shaadi.com/india-matrimony
> >
> >
> 
>  

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

Other related posts: