Hi,
Just follow the steps,
Calling Reports from Forms 9i
1. Create a report using Reports 9i and check it whether it is working in paper layout mode.
2. Create a simple form for calling that report.
3. Create a new reports server service as following (in Command Prompt):
c:> rwserver -install repserver90 autostart=yes
4. Create a Report obect and in the Property Palette for Reports object, enter the following:
Name: rep_name(This will be the name given in Run_Report Object0
Filename: C:\reports\rep.rdf
/*<specify full path to your RDF/REP file or make sure this path is included
into REPORTS_PATH environment variable*/
Report Destination Type: CACHE
Report Destination Format: HTML
Report Server: repserver90
5. In the form run the following code to call the report
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := FIND_REPORT_OBJECT('REPORT10');
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
END LOOP;
IF rep_status = 'FINISHED' THEN
/*Display report in the browser*/
WEB.SHOW_DOCUMENT('
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
ELSE
message('Error when running report');
END IF;
PAUSE;
END;