Home » Developer & Programmer » Forms » frm-41214 (oracle 10g on XP)
frm-41214 [message #442474] |
Mon, 08 February 2010 06:24 |
nehaverma
Messages: 80 Registered: January 2010 Location: JAIPUR
|
Member |
|
|
hello
please tell me the error where I am wrong??
I got an error when I run report from the form.
I use to write this code on run button----
DECLARE
PL_ID paramlist;
repid REPORT_OBJECT;
v_rep varchar2(100);
ReportServerJob VARCHAR2(100);
report_prop VARCHAR2(20);
vjob_id varchar2(100);
server varchar2(100);
v_report_id Report_Object;
vc_report_job_id VARCHAR2(100); /* unique id for each Report request */
vc_rep_status VARCHAR2(100);
BEGIN
PL_ID := Get_Parameter_List('R1');
IF NOT Id_Null(PL_ID) THEN
Destroy_Parameter_List(PL_ID);
end if;
PL_ID:=create_parameter_list('R1');
--add_parameter(PL_ID,'appl_sr_no',TEXT_parameter,:MGM_VENDOR.appl_sr_no);
---sk----
add_parameter(PL_ID,'appl',TEXT_parameter,:MGM_VENDOR.appl_sr_no);
---sk--
-- add_parameter(PL_ID,'FIRM_NAME',TEXT_parameter,:NEW_REGISTER.FIRM_NAME);
-- add_parameter(PL_ID,'NAR',TEXT_parameter,:MFR_JV.NARRATION);
v_report_id:= FIND_REPORT_OBJECT('report39');
-- message('nitin varshney');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,'PDF');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER,:global.server);
vc_report_job_id:=RUN_REPORT_OBJECT(v_report_id,PL_ID);
vc_rep_status := REPORT_OBJECT_STATUS(vc_report_job_id);
vjob_id :=substr(vc_report_job_id,length(:global.server)+2,length(vc_report_job_id));
IF vc_rep_status='FINISHED' THEN
web.show_document ('http://'||:global.host||'/reports/rwservlet/getjobid='||vjob_id ||'?server='||:global.server,'_blank');
ELSE
message ('Report failed with error message '||vc_rep_status);
END IF;
END;
regards//neha
|
|
|
|
|
Re: frm-41214 [message #456419 is a reply to message #446701] |
Mon, 17 May 2010 16:43 |
drkoda
Messages: 1 Registered: May 2010 Location: USA
|
Junior Member |
|
|
Mr.Martin:
This is my first message on this board. I apologize ahead of time in case I'm breaching any of the protocols of the board.
I am testing an identical functional copy of the above code (thanks Neha) resulting in frm-41214 error. You suggested that the loop and run_report_object be discarded in favor of web.show-document. In such a scenario, what piece of code does the job of run_report_object? An example or a sample code would be well appreciated.
Thanks,
Nag
I am getting frm-41214 error -unable to run report. The stand alone report runs fine. From the messages in my code, I know that the run_report_object is the failure point (report_message = 'terminated with failure').
Here is the code in my trigger:
DECLARE
PL_ID paramlist;
repid REPORT_OBJECT;
v_rep varchar2(100);
ReportServerJob VARCHAR2(100);
report_prop VARCHAR2(20);
vjob_id varchar2(100);
v_report_id Report_Object;
vc_report_job_id VARCHAR2(100); /* unique id for each Report request */
vc_rep_status VARCHAR2(100);
BEGIN
PL_ID := Get_Parameter_List('R1');
IF NOT Id_Null(PL_ID) THEN
Destroy_Parameter_List(PL_ID);
end if;
PL_ID:=create_parameter_list('R1');
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
Add_Parameter(pl_id, 'P_RESR_PROG_YR', TEXT_PARAMETER, :NTK_JO_NO_SUMMARY.FY);
Add_Parameter(pl_id, 'P_JO_NO', TEXT_PARAMETER, :NTK_JO_NO_SUMMARY.JO_NO);
Add_Parameter(pl_id, 'P_COST_CEN_MGR', TEXT_PARAMETER, :NTK_JO_NO_SUMMARY.CCMGR);
message('parameter_clause');
v_report_id:= FIND_REPORT_OBJECT('job_order_sum_test');
message('report found');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_EXECUTION_MODE,BATCH);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,'PDF');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER,'repserver90');
message('properties set');
vc_report_job_id:=RUN_REPORT_OBJECT(v_report_id,PL_ID);
message('run report object successful');
vc_rep_status := REPORT_OBJECT_STATUS(vc_report_job_id);
vjob_id :=substr(vc_report_job_id,length('repserver90')+2,length(vc_report_job_id));
-- IF vc_rep_status='FINISHED' THEN
web.show_document ('/reports/rwservlet/getjobid'||vjob_id ||'?server=repserver90','_blank');
-- ELSE
-- message ('Report failed with error message '||vc_rep_status);
-- END IF;
END;
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 00:57:00 CDT 2024
|