0% found this document useful (0 votes)
15 views4 pages

How to Call Report in Form 1

The document provides a guide on how to call reports from Oracle Forms 10g, highlighting the differences from version 6i. It includes detailed instructions on setting up the report server and the necessary code to execute a report within a button trigger. The author also addresses common questions and issues faced by users in the comments section.

Uploaded by

Mohan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

How to Call Report in Form 1

The document provides a guide on how to call reports from Oracle Forms 10g, highlighting the differences from version 6i. It includes detailed instructions on setting up the report server and the necessary code to execute a report within a button trigger. The author also addresses common questions and issues faced by users in the comments section.

Uploaded by

Mohan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Oracle Application Development

In the name of Allah (God), Most Gracious, Most Merciful. Here I share my experience of
oracle development...

Home Database Forms Reports SQL Developer

Friday, April 27, 2012

How to call a report in Forms 10g ?


Calling reports from forms isn't like forms version 6i, where you can call a report via RUN_PRODUCT.
I will talk another day if i think it's needed. Because Forms version 6i isn't supported by Oracle.com and it's uses is going to
decreases.

Lets talk about version 10g Developer Suite. In development environment you need to run report server manually but at
Application Server it's not needed.

How can we run report server manually ?


Just go to start menu >> run and type

rwserver SERVER=myserver

Where myserver is the server name.

Now reports server runs.

In your form under Reports Node create an report object and give name MYREPORT.

(Select Reports Node click on Create Icon(+), select Use Existing Report File then give

a name in the box and click OK.

Re-name it to MYREPORT go to property and delete FILENAME property value.)

Make changes(Report Name) on following code and try this in a Button trigger

DECLARE

v_repid REPORT_OBJECT;
v_rep VARCHAR2(100);
v_rep_status VARCHAR2(100);
v_param VARCHAR2(200) := NULL;
v_valor VARCHAR2(200);
v_url VARCHAR2(2000);
v_repserver varchar2(20) := 'myserver';

v_report varchar2(100) := 'D:\REPORT_NAME.REP';

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
v_PARAMETRO varchar2(100) := '';

BEGIN

v_repid := FIND_REPORT_OBJECT('MYREPORT'); -- report is an element from object navigator report


SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_FILENAME, v_report);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESTYPE, cache);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESFORMAT, 'pdf' );
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESNAME, v_report);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_SERVER, v_repserver);
SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_OTHER, 'paramform=no '||v_PARAMETRO);
v_rep := RUN_REPORT_OBJECT(v_repid);
v_rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE v_rep_status IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
v_rep_status := REPORT_OBJECT_STATUS(v_rep);
END LOOP;
IF v_rep_status = 'FINISHED' THEN
message(v_rep);
message(v_rep);
WEB.SHOW_DOCUMENT(v_url||'/reports/rwservlet/getjobid'||
SUBSTR(v_rep, INSTR(v_rep,'_', -1)+1)||'?'||'server='||v_repserver, '_blank');
END IF;

END;

Updated: 20/January/2013

For more Click Here

Hope this helps you all.

Posted by Md. Hamidur Rahman Siddique at 10:06 PM


Labels: 10g, Reports

13 comments:

oracleuser August 14, 2012 at 1:06 PM

Salam, to call report in 10g, do we need to configure any file?


Reply

Md. Hamidur Rahman Siddique August 26, 2012 at 7:38 PM


Walikum as salam o rahmatillah.

Sorry for delay as for Eid Festival. No need to configure any other file. But at testing PC, you need to give a report server name and run
the server.

Thanks
Reply

oracleuser August 27, 2012 at 7:59 AM

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
thanks for reply = ) can you elaborate more?
Reply

Md. Hamidur Rahman Siddique August 28, 2012 at 8:09 PM


@ oracleuser. Specifically what you want to know ?
Reply

Unknown September 30, 2012 at 12:29 AM


Iam using forms 6i,reports 6i,but my question is I am calling the report from form(custom form). Report is having parameters also. its
calling the reprot When I click on the button ,but i am unable to see the parameter data in report.
my code is
DECLARE
pl_id100 ParamList;
the_param varchar2(15):='CLIENT';
BEGIN

if :PROVISIONAL.BRAND='SREEVARI' THEN
IF :PROVISIONAL.final_inv_num IS NOT NULL THEN
-- Destroy_Parameter_List(pl_id);
PL_ID100:=GET_PARAMETER_LIST(THE_PARAM);
IF NOT ID_NULL(PL_ID100) THEN
DESTROY_PARAMETER_LIST(PL_ID100);
END IF;
PL_ID100:=CREATE_PARAMETER_LIST(THE_PARAM);--'CLIENT');
ADD_PARAMETER(PL_ID100,'DNO',TEXT_PARAMETER,:PROVISIONAL.final_inv_num);
MESSAGE('INVOICE NUMBER--'||:PROVISIONAL.final_inv_num);
Run_Product(REPORTS, 'D:\svct backup\sct\INVOICE-SVCT-PROV',SYNCHRONOUS,RUNTIME,FILESYSTEM,PL_ID100 ,
NULL);
Destroy_Parameter_List(pl_id100);
ELSE
MESSAGE(' PLEASE ENTER INVOICE NUMBER.....');
END IF;
END IF;

END;

Reply

Unknown February 16, 2013 at 11:49 AM


But not Show.................
Reply

Replies

Md. Hamidur Rahman Siddique February 19, 2013 at 10:51 AM


what problem your are getting ? @ Ahmed Farid

Reply

Jaweed Qur;shie August 28, 2013 at 2:46 AM

as salam alakum Md. Hamidur Rahman Siddique, thank you to put this procedure on the web .. is very useful for me ,,,
Reply

Anonymous September 11, 2013 at 1:57 PM

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
AOA,

as you wrote the procedure to call report from Form, what about KILLJOBID ? is not required in 10g or something else.

regards.
Reply

amlangle October 25, 2013 at 5:05 AM


Hello Md. Hamidur Rahman Siddique.

Is there a way to pass other different user from Forms 10g to Reports 10g? I mean, if I've connected to my app with X user, how I pass
a different user of X to Reports?

I've tried using:


SET_REPORT_OBJECT_PROPERTY ('ny_report', REPORT_OTHER, 'paramform=no user_id=other_user/pwd@database');

But it doesn't work.

Could you help me please?


Reply

Anonymous October 26, 2013 at 12:13 AM

Not sure, didn't try. @ amlangle aml


Reply

Anonymous March 6, 2015 at 12:09 PM


salam alikum bro!!
i did all the above but its bot runnig and giving the following msg:
REP-51002: Bind to Reports Server obs failed

how to solve it bro...


Reply

leeba December 3, 2015 at 5:53 PM


I want to call report from menu.(Oracle 10g). Can u show how?
Reply

Newer Post Home Older Post

Subscribe to: Post Comments (Atom)

Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF

You might also like