Hello,
We have recently migrated from Oracle Forms and Reports 6i to 12c.
I am using web.show_document to navigate to URL when calling Reports from Forms.
I can call non-parameterized report using 'WHEN-BUTTON-PRESSED' (can navigate to Report and it opens in HTML).
The issue I have is with parameterized report, for e.g. I have two parameters to be passed to the report.
I have created -
1. Form
2. Added two text boxes
3. Add two buttons, one to 'Run Report' and another one to 'Exit' form.
4. I have added my code in 'Run Report' , using 'WHEN-BUTTON-PRESSED' trigger.
5. Added report object
Code is as the below -
Declare
v_report_id Report_Object;
vc_ReportServerJob VARCHAR2(100);
vc_rep_status VARCHAR2(100);
vjob_id VARCHAR2(100);
v_report_url varchar(2000);
BEGIN
v_report_id:= FIND_REPORT_OBJECT('IDS005');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,'HTML');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER,'rep_wls_reports_reportservername');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER,'SELECT_INV='||:PARAMETERS.SELECT_INV||' paramform=no');
vc_ReportServerJob:=RUN_REPORT_OBJECT(v_report_id);
vjob_id := substr(vc_ReportServerJob,instr(vc_ReportServerJob,'_',-1)+1);
vc_rep_status := REPORT_OBJECT_STATUS(vc_ReportServerJob);
v_report_url := 'http://localhost:8002/reports/rwservlet/getjobid'|| vjob_id ||'?server=rep_wls_reports_reportservername';
IF vc_rep_status = 'FINISHED' THEN
WEB.SHOW_DOCUMENT(v_report_url,'_blank');
ELSE
message ('Report failed with error message '||vc_rep_status);
END IF;
END;
-----------------------
When I click on 'Run Report' button, I get error 'Unable to Run report' .
Let me know if I am missing any statements , which are needed.
I can share more information to help to resolve this issue.