Home » Developer & Programmer » Forms » Intergrating Oracle Forms and Reports
Intergrating Oracle Forms and Reports [message #165985] Mon, 03 April 2006 21:07 Go to next message
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 messageGo to next message
ahmad_uaf
Messages: 68
Registered: March 2006
Location: Pakistan
Member

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

Re: Intergrating Oracle Forms and Reports [message #166169 is a reply to message #166071] Tue, 04 April 2006 23:36 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Muhammad,

Please format your code when posting. It makes it much easier to read.

David
Re: Intergrating Oracle Forms and Reports [message #166170 is a reply to message #166071] Wed, 05 April 2006 00:06 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
For parameters, also look at http://www.orafaq.com/forum/r/reply_to/166071/67467/. I also ALWAYS suggest NOT using run_report_object as it does NOT automatically start or restart the report server if it is not running or has failed. Please ALWAYS consider using 'web.show_document' see http://www.orafaq.com/forum/m/144539/67467/?srch=web.show_document#msg_144539

David
Previous Topic: Calendar Problem in Forms
Next Topic: how i disable add and delete button fomr toolbar
Goto Forum:
  


Current Time: Fri Sep 20 06:54:14 CDT 2024