run_report_object not working [message #661787] |
Sun, 02 April 2017 07:44 |
akhalaf
Messages: 7 Registered: February 2010 Location: jordan
|
Junior Member |
|
|
hi
i'm trying to migrate from 6i to 11g using the this code i copied it is reaching run_report_object and hangs their with no response , i tried checking the report server but it is not running i think is there a way to check the report server if it is running
-------------------------------------------- the calling code
declare
reportserver varchar2(50) ;
ParaListID ParamList ;
Paralist varchar2(50) ;
report_id report_object ;
ReportServerJob varchar2(100) ;
v_jobid number(12) ;
rep_status varchar2(20) ;
v_url varchar2(120) ;
begin
IF NOT Id_Null(ParaListID) then
Destroy_Parameter_List(ParaListID);
END IF;
ParaListID:= Create_Parameter_List (ParaList);
reportserver:=get_sys_param('REPORT_SERVER_NAME') ;
report_id := find_report_object('ACCREP07');
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESFORMAT, 'pdf');
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_SERVER,reportserver );
Add_Parameter(ParaListID,'XYEAR',TEXT_PARAMETER,:ATM_YEAR);
Add_Parameter(ParaListID,'XTRN_TYPE',TEXT_PARAMETER,:ATM_TRN_TYPE);
Add_Parameter(ParaListID,'XTRN_NO',TEXT_PARAMETER,:ATM_TRN_NO);
Add_Parameter(ParaListID,'XOFFICE_NO',TEXT_PARAMETER,:ATM_OFFICE_NO);
Add_Parameter(ParaListID, 'PARAMFORM', TEXT_PARAMETER, 'NO');
Add_Parameter(ParaListID, 'XLANG', TEXT_PARAMETER, :XLANG);
:xstatus:='near end 0' ;
pause ;
ReportServerJob := run_report_object(report_id,ParaListID);
:xstatus:='near end 1' ;
pause ;
v_jobID := substr(ReportServerJob,length(reportserver)+2,length(ReportServerJob));
IF ReportServerJob is NOT NULL THEN
rep_status := report_object_status(ReportServerJob);
:xstatus:='near end 2' ;
WHILE rep_status in ('RUNNING', 'OPENING_REPORT','ENQUEUED') LOOP
rep_status := report_object_status(ReportServerJob);
END LOOP;
IF rep_status != 'FINISHED' THEN
raise form_trigger_failure ;
END IF;
v_url := '/reports/rwservlet/getjobid'||v_jobID||'?server='||reportserver;
Web.Show_Document(v_url,'_blank');
ELSE
raise form_trigger_failure;
END IF;
end ;
----------------------------------------------------------------------------
|
|
|
|
|