Home » Developer & Programmer » Forms » frm-41214 (oracle 10g on XP)
frm-41214 [message #442474] Mon, 08 February 2010 06:24 Go to next message
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 #442655 is a reply to message #442474] Tue, 09 February 2010 14:30 Go to previous messageGo to next message
nastyjillu
Messages: 211
Registered: February 2009
Senior Member
neha,

did you get any error when you ran the report?

thanks
raghu
Re: frm-41214 [message #446701 is a reply to message #442474] Wed, 10 March 2010 00:54 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Sorry that I have been so long in replying. Have you solved your problem?

Lose the 'run_report_object' and the 'loop', and just use 'web.show_document'.

David
Re: frm-41214 [message #456419 is a reply to message #446701] Mon, 17 May 2010 16:43 Go to previous messageGo to next message
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;
Re: frm-41214 [message #457077 is a reply to message #456419] Fri, 21 May 2010 00:34 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
The 'web.show_document' does the equivalent to a 'run_report_object'. There are numerous examples of 'web.show_document' in this forum. Use the 'web' half of http://www.orafaq.com/forum/m/144539/67467/?srch=web.show_document#msg_144539

David
Previous Topic: application forms
Next Topic: need help with forms upgradation from oracle support
Goto Forum:
  


Current Time: Sat Sep 24 18:01:47 CDT 2016

Total time taken to generate the page: 0.07540 seconds