Home » Developer & Programmer » Forms » Calling a report from a form (oracle 9iDS)
Calling a report from a form [message #313859] Mon, 14 April 2008 23:17 Go to next message
rakhatmis
Messages: 25
Registered: March 2008
Junior Member
Hello experts
I hope you all are fine & enjoying good health. I am facing a problem after migration from oracle 6i to oracle 9i, I wonder if someone can help me in calling a report from a form. I have used RUN_REPORT_OBJECT instead of RUN_PRODUCT but I am getting error FRM-41214 unable to run report and FRM-41213 unable to connect to the report server.
Can anyone help me immediately regarding this problem?
Thanking you in advance for your time
Re: Calling a report from a form [message #313865 is a reply to message #313859] Mon, 14 April 2008 23:46 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you'd want to use WEB.SHOW_DOCUMENT instead.
Re: Calling a report from a form [message #313872 is a reply to message #313865] Mon, 14 April 2008 23:58 Go to previous messageGo to next message
rakhatmis
Messages: 25
Registered: March 2008
Junior Member
i have used it
here is my code behind WHEN_BUTTON PRESSED trigger

DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := FIND_REPORT_OBJECT('BPS');
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

WEB.SHOW_DOCUMENT('http://pcsir-mis-1:8888/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rep_server90','_self');
ELSE
message('Error when running report');
END IF;
PAUSE;


and in the reports object property pallete i have set
Report Destination Type: CACHE
Report Destination Format: HTML
Execution Mode: RUN TIME
Communication Mode:ASYNCHRONOUS

kindly now guide where i am wrong or missing something

Re: Calling a report from a form [message #313948 is a reply to message #313872] Tue, 15 April 2008 05:24 Go to previous messageGo to next message
varosh81
Messages: 178
Registered: February 2008
Location: CHENNAI
Senior Member
hi

how to call reports from form.

please send steps
Re: Calling a report from a form [message #314154 is a reply to message #313948] Tue, 15 April 2008 22:09 Go to previous message
rakhatmis
Messages: 25
Registered: March 2008
Junior Member
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('http://19.195.153.39:8888/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
ELSE
message('Error when running report');
END IF;
PAUSE;
END;

Previous Topic: Prob: No Interface Deriver Detected, function can not be performed
Next Topic: forms running very slowly.
Goto Forum:
  


Current Time: Wed Dec 07 06:29:40 CST 2016

Total time taken to generate the page: 0.25302 seconds