HELP! Confusing problem in report-form integration!
Hi all, I have a problem in integrating report in dev10i. I used to use Dev6i and have no problem in using run_report_object in 6i.
I got the REP-0503 You did not specify the name of the report and FRM-40738 Argument 1 to builtin Report_Object_Status can not be null. The report run OK in report builder and I create the paper only layout. Also, I save the report as *.rdf and create a report object in form that point to this *.rdf file.
This is my PL/SQL code:
PROCEDURE P_PRINT_REPORT_OBJ(vc_reportoj Varchar2, vc_reportserver Varchar2, vc_runformat Varchar2) IS
v_report_id Report_Object;
vc_ReportServerJob VARCHAR2(100);
vc_rep_status VARCHAR2(100);
vjob_id VARCHAR2(100);
BEGIN
v_report_id := FIND_REPORT_OBJECT(vc_reportoj);
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, vc_runformat);
SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_SERVER, vc_reportserver);
SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_OTHER, 'aplikasi_id='||:APLIKASI_BBM_INDUSTRI.APLIKASI_ID||' paramform=no');
vc_ReportServerJob := RUN_REPORT_OBJECT(v_report_id);
vjob_id := substr(vc_ReportServerJob,length(vc_reportserver)+2,length(vc_ReportServerJob));
vc_rep_status := REPORT_OBJECT_STATUS(vc_ReportServerJob);
IF vc_rep_status = 'FINISHED' THEN
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||vjob_id||'?server='||vc_reportserver, '_blank');
ELSE
message('Report failed with error message '||vc_rep_status);
END IF;
END;
What gives? Do I miss something here? Also what is the name of report server in Dev10i? I am under impression that this is not needed so I put blank '' when I call this procedure in WHEN-BUTTON-PRESSED trigger like this:
P_PRINT_REPORT_OBJ('myreportobj','','HTML');