How i call Reports from Forms10g.

Answers were Sorted based on User's Feedback



How i call Reports from Forms10g...

Answer / clement r

run_product will not work in the web
environment.Run_report_object is the only way to create
and web.show_document should be used to display the
executed job.

Is This Answer Correct ?    5 Yes 1 No

How i call Reports from Forms10g...

Answer / gaurav singh

PROCEDURE call_rep IS
BEGIN
declare
pi_id paramlist;
oth varchar2(30);
N_COPIES varchar2(5);
F_N VARCHAR2(30);
COD varchar(30);
typ VARCHAR2(1);
comp_code varchar2(2);
supplier_code number(6);
STORE_VAR VARCHAR2(50);
alrt_var number;

vc_reportserverjob varchar2(100);
report_job_id varchar2(100);
repid report_object;
v_rep_status varchar2(100);
begin
--------------------------------------
repid:=find_report_object('RP2RRO');


proc_path('path of ur rdf',store_var);
store_var:=store_var||rdf name';
set_report_object_property
(repid,report_filename,store_var);
set_report_object_property
(repid,report_server,:global.r_server);
set_report_object_property
(repid,report_execution_mode,runtime);
set_report_object_property
(repid,report_comm_mode,synchronous);
set_report_object_property
(repid,report_destype,cache);
set_report_object_property
(repid,report_desformat,:GLOBAL.dsfmt);
----------------------------------------------------
------


pi_id := get_parameter_list('it_param');
if not Id_null(pi_id) then
destroy_parameter_list(pi_id);
end if;

pi_id := create_parameter_list('it_param');

add_parameter(pi_id,'order_no',TEXT_PARAMETER,COD);
add_parameter
(pi_id,'order_date',TEXT_PARAMETER,to_char
add_parameter(pi_id,'comp_code',TEXT_PARAMETER,comp_code);
add_parameter
(pi_id,'supplier_code',TEXT_PARAMETER,supplier_code);
add_parameter
(pi_id,'PARAMFORM',TEXT_PARAMETER,'NO');




vc_reportserverjob := RUN_REPORT_OBJECT
(repid,pi_id);
report_job_id:=substr
(vc_reportserverjob,length(:global.r_server)+2,length
(vc_reportserverjob));
v_rep_status:=report_object_status
(vc_reportserverjob);

if v_rep_status='FINISHED' then
web.show_document
('http://'||:global.host||':'||:global.port||'/reports/rwser
vlet/getjobid'|| report_job_id||'?
server='||:global.r_server,'_blank');
else
message ('error when running report'||v_rep_status);
end if;


go_item('dt_pur_order.nu_price');
show_view('cg$page_1');
end;
END;

Is This Answer Correct ?    4 Yes 0 No

How i call Reports from Forms10g...

Answer / xeeshan

Can you pls guide me what is ":global.host"
and ":global.port". I know, it's the application server
name but my question is: how will this code work when we
deploy it on web (on the internet)?

Do I need to hardcode the URL? like
web.show_document
('http://www.sis.edu.com'||'/reports/rwser
vlet/getjobid'|| report_job_id||'?
server='||:global.r_server,'_blank');

Actually my application is working in different domains, so
can you pls give me the way to retreive the url of my
current (opened) form (from where i am calling the report)

Thank you very much!

Is This Answer Correct ?    1 Yes 0 No

How i call Reports from Forms10g...

Answer / priyanka

We can use RUN_PRODUCT function for doing so.....



Description

Invokes one of the supported Oracle tools products and
specifies the name of the module or module to be run. If
the called product is unavailable at the time of the call,
Form Builder returns a message to the end user.
If you create a parameter list and then reference it in the
call to RUN_PRODUCT, the form can pass text and data
parameters to the called product that represent values for
command line parameters, bind or lexical references, and
named queries. Parameters of type DATA_PARAMETER are
pointers to record groups in Form Builder. You can pass
DATA_PARAMETERs to Report Builder and Graphics Builder, but
not to Form Builder.

To run a report from within a form, you can alternatively
use the dedicated report integration built-in
RUN_REPORT_OBJECT .

Syntax

PROCEDURE RUN_PRODUCT
(product NUMBER,
module VARCHAR2,
commmode NUMBER,
execmode NUMBER,
location NUMBER,
paramlist_id VARCHAR2,
display VARCHAR2);
PROCEDURE RUN_PRODUCT
(product NUMBER,
module VARCHAR2,
commmode NUMBER,
execmode NUMBER,
location NUMBER,
paramlist_name VARCHAR2,
display VARCHAR2);

Built-in Type unrestricted procedure
Enter Query Mode yes

Parameters

product Specifies a numeric constant for the Oracle product
you want to invoke: FORMS specifies a Runform session.
GRAPHICS specifies Graphics Builder. REPORTS specifies
Report Builder. BOOK specifies Oracle Book.
module Specifies the VARCHAR2 name of the module or module
to be executed by the called product. Valid values are the
name of a form module, report, Graphics Builder display, or
Oracle Book module. The application looks for the module or
module in the default paths defined for the called product.

commmode Specifies the communication mode to be used when
running the called product. Valid numeric constants for
this parameter are SYNCHRONOUS and ASYNCHRONOUS.

SYNCHRONOUS specifies that control returns to Form Builder
only after the called product has been exited. The end user
cannot work in the form while the called product is running.
ASYNCHRONOUS specifies that control returns to the calling
application immediately, even if the called application has
not completed its display.

execmode Specifies the execution mode to be used when
running the called product. Valid numeric constants for
this parameter are BATCH and RUNTIME. When you run Report
Builder and Graphics Builder, execmode can be either BATCH
or RUNTIME. When you run Form Builder, always set execmode
to RUNTIME.

location Specifies the location of the module or module you
want the called product to execute, either the file system
or the database. Valid constants for this property are
FILESYSTEM and DB.

Paramlist_name or paramlist_ID Specifies the parameter list
to be passed to the called product. Valid values for this
parameter are the VARCHAR2 name of the parameter list, the
ID of the parameter list, or a null string (''). To specify
a parameter list ID, use a variable of type PARAMLIST.

You can pass text parameters to called products in both
SYNCHRONOUS and ASYNCHRONOUS mode. However, parameter lists
that contain parameters of type DATA_PARAMETER (pointers to
record groups) can only be passed to Report Builder and
Graphics Builder in SYNCHRONOUS mode. (SYNCHRONOUS mode is
required when invoking Graphics Builder to return an
Graphics Builder display that will be displayed in a form
chart item.)
Note: You can prevent Graphics Builder from logging on by
passing a parameter list that includes a parameter with key
set to LOGON and value set to NO.

Note: You cannot pass a DATA_PARAMETER to a child query in
Report Builder. Data passing is supported only for master
queries.

display Specifies the VARCHAR2 name of the Form Builder
chart item that will contain the display (such as a pie
chart, bar chart, or graph) generated by Graphics Builder.
The name of the chart item must be specified in the format
block_name.item_name. (This parameter is only required when
you are using an Graphics Builder chart item in a form.)

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More Oracle Forms Reports Interview Questions

What are the types of calculated columns available?

1 Answers  


Explain the different levels at which oracle form services interact.

0 Answers  


List the built-in routines for the controlling canvas views during run-time?

1 Answers  


What are the built_in used to trapping errors in forms 4?

1 Answers  


What are the built-ins used for finding object ID functions?

2 Answers  






What is a canvas in oracle forms?

0 Answers  


What built-in is used for showing the alert during run-time?

1 Answers  


How can a square be drawn in the layout editor of the report writer?

1 Answers  


What is the difference between an ON-VALIDATE-FIELD trigger and a trigger ?

2 Answers  


How to change maximise or minimise the window in forms

4 Answers   Oracle,


While specifying master/detail relationship between two blocks specifying the join condition is a must ? True or False.

2 Answers  


based on parameter value layout of report should change

1 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)