Home » Developer & Programmer » Reports & Discoverer » calling report thorugh DB Block (Oracle 10g)
calling report thorugh DB Block [message #472381] Fri, 20 August 2010 04:58
rajiv.datta
Messages: 21
Registered: June 2007
Location: London
Junior Member

Hi,

I am trying to call a report through a pl/sql code using Event Driven Publishing and getting an error while executing it.

The code is

DECLARE
myplist srw_paramlist;
myident srw.job_ident;
mystatus srw.status_record;
v_distribution_xml VARCHAR2(200);

v_email Varchar2(50);
v_date DATE;

/* Cursors to lookup email adresses, server settings etc */

BEGIN
srw.start_debugging;
myplist := srw_paramlist(srw_parameter('', ''));
srw.add_parameter(myplist, 'gateway', 'http://localhost:8889/reports/rwservlet?');
srw.add_parameter(myplist, 'server' , 'dattar');
srw.add_parameter(myplist, 'report' , 'c:/oracle/devsuitehome_10g/bin/mycode/test.rep'); --path to where report is
srw.add_parameter(myplist, 'userid' , 'dattar/dattar@devlsp1'[/email]);
srw.add_parameter(myplist, 'destype', 'FILE');
srw.add_parameter(myplist, 'desformat' , 'PDF');
srw.add_parameter(myplist, 'destination', 'c:/oracle/devsuitehome_10g/bin/mycode/test.pdf');
srw.add_parameter(myplist, 'DOCTYPE', 'PUBLIC');
--' v_distribution_xml);--path to where xml file
-- srw.add_parameter(myplist, 'destination', 'C:/dattar/poc/test.xml');--' v_distribution_xml);--path to where xml file
-- srw.add_parameter(myplist, 'distribute' , 'YES');
-- srw.add_parameter(myplist, 'p_to' , 'xx.xx@xxxxxx.co.uk'[/email]); --bespoke parameters for report
-- srw.add_parameter(myplist, 'p_filename' , 'application');
-- srw.add_parameter(myplist, 'P_ORD_ID', a_ord_id);
-- srw.remove_parameter(myPlist,'statusformat');
myident := srw.run_report(myplist);
-- mystatus := srw.report_status(myident);
srw.stop_debugging;

--RETURN mystatus.statustext;

EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Ora : '|| SQLERRM);
dbms_output.put_line('An unhandled exception occured, please send the report manually');
END;


This is the output that i am getting with error


****************************************
* WELCOME TO EVENT-BASED-REPORTING API *
* API-Version : 9i *
* (C) Oracle Corporation, 2000 - 2002 *
*
* Debugging turned ON **************************
*** Length of Paramlist : 1
OK : Parameter added : GATEWAY=http://localhost:8889/reports/rwservlet?
*** Length of Paramlist : 2
OK : Parameter added : SERVER=dattar
*** Length of Paramlist : 3
OK : Parameter added : REPORT=c:/oracle/devsuitehome_10g/bin/mycode/test.rep
*** Length of Paramlist : 4
OK : Parameter added : USERID=dattar/dattar@devlsp1[/email]
*** Length of Paramlist : 5
OK : Parameter added : DESTYPE=FILE
*** Length of Paramlist : 6
OK : Parameter added : DESFORMAT=PDF
*** Length of Paramlist : 7
OK : Parameter added : DESTINATION=c:/oracle/devsuitehome_10g/bin/mycode/test.pdf
*** Length of Paramlist : 8
OK : Parameter added : DOCTYPE=PUBLIC
Starting run_report: building url
*** Building URL (RUN_REPORT)
OK : URL built : http://localhost:8889/reports/rwservlet?&SERVER=dattar&REPORT=c%3A%2Foracle%2Fdevsuitehome_10g%2Fbin%2Fmycode%2Ftest.rep& USERID=dattar%2Fdattar%40devlsp1&DESTYPE=FILE&DESFORMAT=PDF&DESTINATION=c%3A%2Foracle%2Fdevsuitehome_10g%2Fbin%2Fmyc
*** Submitting HTTP Request
*** using URL :http://localhost:8889/reports/rwservlet?&SERVER=dattar&REPORT=c%3A%2Foracle%2Fdevsuitehome_10g%2Fbin%2Fmycode%2Ftest.rep& ;amp ;USERID=dattar%2Fdattar%40devlsp1&DESTYPE=FILE&DESFORMAT=PDF&DESTINATION=c%3A%2Foracle%2Fdevsuitehome_10g%2Fbin%2Fmycod
OK : Request submitted - Return stream : <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /reports/rwservlet was not found on this server.<P>
<HR>
<ADDRESS>Ora
OK : Request submitted - Length of stream : 325
Ora : ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00225: end-element tag "BODY" does not match start-element tag "HR"
Error at line 9
An unhandled exception occured, please send the report manually


its with respect to XML.

Please guide me.

Thanks in advance.
Rajiv

[Updated on: Fri, 20 August 2010 05:42]

Report message to a moderator

Previous Topic: pdf file with passwords protection using oracle 6i report
Next Topic: order the list of value
Goto Forum:
  


Current Time: Tue Sep 16 04:30:09 CDT 2014

Total time taken to generate the page: 0.08905 seconds