Home » Developer & Programmer » Forms » error while running reports
error while running reports [message #428353] Wed, 28 October 2009 01:41 Go to next message
mandark
Messages: 23
Registered: October 2009
Junior Member
Hi,
I am using run_report() function created as follows:

PROCEDURE Run_Report (report_name IN VARCHAR2) IS

pl_id ParamList;
rep_id REPORT_OBJECT;
rep_url varchar2(2000);
rep_status varchar2(200);
vjob_id varchar2(30);
BEGIN
pl_id := Get_Parameter_List('paramdata');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;

pl_id := Create_Parameter_List('paramdata');

Add_Parameter (pl_id,'P_SYS_GROUP_ID',TEXT_PARAMETER,:GLOBAL.sys_grp_id);

Add_Parameter(pl_id,'P_SYS_USR_LVL',TEXT_PARAMETER,:GLOBAL.sys_usr_lvl);

rep_id := FIND_REPORT_OBJECT(report_name);

SET_REPORT_OBJECT_PROPERTY (rep_id, REPORT_FILENAME, report_name);

SET_REPORT_OBJECT_PROPERTY (rep_id, REPORT_EXECUTION_MODE, RUNTIME);

SET_REPORT_OBJECT_PROPERTY (rep_id, REPORT_COMM_MODE, SYNCHRONOUS);

SET_REPORT_OBJECT_PROPERTY (rep_id, REPORT_DESTYPE, CACHE);
SET_REPORT_OBJECT_PROPERTY (rep_id, REPORT_DESFORMAT, 'PDF');
SET_REPORT_OBJECT_PROPERTY(rep_id,REPORT_SERVER, 'rep_a356jxdzxlcxzwn');

rep_url := RUN_REPORT_OBJECT(rep_id,pl_id);
rep_status := REPORT_OBJECT_STATUS(rep_url);

WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
rep_status := report_object_status(rep_url);
END LOOP;
IF rep_status = 'FINISHED' THEN
vjob_id :=substr(rep_url,length('rep_a356jxdzxlcxzwn')+2,length(rep_url));
WEB.SHOW_DOCUMENT('http://host_name:8889/reports/rwservlet/getjobid'||vjob_id||'?server='||'rep_a356jxdzxlcxzwn&paramform=yes','_blank');

ELSE message('Error when running report');
END IF;

END;

problem which i am facing while running report is that while
executing run_report_object(rep_id,pl_id) error is occuring
and 'unable to run report' message is appearing.

Please suggest solution.
I have also included report object with calling form.
Re: error while running reports [message #428416 is a reply to message #428353] Wed, 28 October 2009 04:57 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Quote:
rep_id := FIND_REPORT_OBJECT(report_name);
Debug what this is returning. If it returns NULL, then some issue with the path.
Crosscheck the PATH and the file name of the report file.

By
Vamsi
Re: error while running reports [message #428420 is a reply to message #428416] Wed, 28 October 2009 05:37 Go to previous message
mandark
Messages: 23
Registered: October 2009
Junior Member
thanks, issue is resolved i have removed all the code and just used web.show_document() parameters for report are passed through the same function.

Previous Topic: hint: turn on Query/Where dialog box in Oracle forms 10.1.2.0.2
Next Topic: running reports from forms in oracle 10g
Goto Forum:
  


Current Time: Fri Sep 20 06:41:57 CDT 2024