Intergrating Oracle Forms and Reports [message #165985] |
Mon, 03 April 2006 21:07 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gvitou
Messages: 3 Registered: March 2006
|
Junior Member |
|
|
How can I pass a variable in Oracle forms 9i to a Oracle Reports 9i.
I have a report and I want it to filter out data based on a variable in Forms developer. How do I do that.
Thanks in advance
Gee
|
|
|
Re: Intergrating Oracle Forms and Reports [message #166071 is a reply to message #165985] |
Tue, 04 April 2006 06:25 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ahmad_uaf
Messages: 68 Registered: March 2006 Location: Pakistan
|
Member |
![ahmad_uaf%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
i think u want to run the report from Form.
I don't know how can it possible in 9i but in 10g it will do like this!!
This is the code which is use to run the report from form with Three Parameter Passing To the Report.
method is...........
First create the Report Object From Object Navigator and give him the path of Report.
Then Wrtie the following Code in when button press Trigger and adjust according to ur environment.
declare
REPORT_ID REPORT_OBJECT;
REPORTSERVERJOB VARCHAR2(100);
REPORT_STATUS VARCHAR2(100);
JOB_ID VARCHAR2(100);
P_LIST_ID PARAMLIST;
a number;
b number;
c number;
d number;
e number;
f number;
BEGIN
a:=null;
b:=null;
c:=null;
d:=null;
e:=null;
f:=null;
P_LIST_ID := GET_Parameter_List('PLIST');
REPORT_ID := FIND_REPORT_OBJECT('REPORTOBJ');
SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_FILENAME,'C:\JOB_DESCRIPTION_RPT11.rdf');
SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_DESFORMAT,'HTMLCSS');
SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_SERVER,'rep_aamir-saleem');
REPORTSERVERJOB := RUN_REPORT_OBJECT(REPORT_ID);
SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_OTHER,'dept_id='||to_number(:BLOCK3.dept_id)||' and sec_id='||to_number(:BLOCK3.sec_id)||' and Desig='||to_number(:BLOCK3.desig_id)|| ' PARAMFORM=NO');
REPORTSERVERJOB := RUN_REPORT_OBJECT(REPORT_ID,P_LIST_ID);
JOB_ID := SUBSTR(REPORTSERVERJOB,LENGTH('rep_aamir-saleem')+2,LENGTH(REPORTSERVERJOB));
REPORT_STATUS := REPORT_OBJECT_STATUS(REPORTSERVERJOB);
IF REPORT_STATUS = 'FINISHED' THEN
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid' || JOB_ID || '?server=' || 'rep_aamir-saleem','_parent');
END IF;
end;
May be it will help you ...
I use to send parameter though this line of Code:
SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_OTHER,'dept_id='||to_number(:BLOCK3.dept_id)||' and sec_id='||to_number(:BLOCK3.sec_id)||' and Desig='||to_number(:BLOCK3.desig_id)|| ' PARAMFORM=NO');
[Updated on: Tue, 04 April 2006 06:28] Report message to a moderator
|
|
|
|
|