Home » Developer & Programmer » Forms » calling reports from forms6.0
calling reports from forms6.0 [message #78348] Fri, 15 February 2002 03:57 Go to next message
hamish
Messages: 2
Registered: February 2002
Junior Member
Hello

Does anybody know how to call up the report parameter screen from inside a form.I have a form with a number of buttons which should execute the running of various reports.I have tried using the open_report command but no luck.

Thanks

Hamish
Re: calling reports from forms6.0 [message #78350 is a reply to message #78348] Fri, 15 February 2002 04:06 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
use run_product to call report
---------------------------------
Syntax:
RUN_PRODUCT(product, document, commmode, execmode, location,
list, display);

RUN_PRODUCT(product, document, commmode, execmode, location,
name, display);

Built-in Type: unrestricted procedure

Enter Query Mode: yes

Description:
Invokes one of the supported Oracle tools products and specifies the name of the document or module to be run. If the called product is unavailable at the time of the call, Oracle Forms returns a message to the operator.

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 Oracle Forms. You can pass DATA_PARAMETERs to Oracle Reports and Oracle Graphics, but not to Oracle Forms or Oracle Book.

Parameters:

product Specifies a numeric constant for the Oracle product you want to invoke: FORMS specifies a Runform session. GRAPHICS specifies Oracle Graphics. REPORTS specifies Oracle Reports. BOOK specifies Oracle Book.

document Specifies the CHAR name of the document or module to be executed by the called product. Valid values are the name of a form module, report, Oracle Graphics display, or Oracle Book document. The application looks for the module or document 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 Oracle Forms only after the called product has been exited. The operator 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 Oracle Reports and Oracle Graphics, execmode can be either BATCH or RUNTIME. When you run Oracle Forms, always set execmode to RUNTIME.
location Specifies the location of the document 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.
list or name Specifies the parameter list to be passed to the called product. Valid values for this parameter are the CHAR name of the parameter list, the ID of the parameter list, or NULL. To specify a parameter list ID, use a variable of type PARAMLIST.
Note: 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 Oracle Reports and Oracle Graphics in SYNCHRONOUS mode. (SYNCHRONOUS mode is required when invoking Oracle Graphics to return an Oracle Graphics display that will be displayed in a form chart item.)

Note: You can prevent Oracle Graphics 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 Oracle Reports. Data passing is supported only for master queries.

display Specifies the CHAR name of the Oracle Forms chart item that will contain the display (such as a pie chart, bar chart, or graph) generated by Oracle Graphics. 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 Oracle Graphics chart item in a form.)
Example:
/*

** Built-in: RUN_PRODUCT
** Example: Call an Oracle Reports 2.5 report, passing the
** data in record group 'EMP_RECS' to substitute
** for the report's query named 'EMP_QUERY'.
** Presumes the Emp_Recs record group already
** exists and has the same column/data type
** structure as the report's Emp_Query query.
*/
PROCEDURE Run_Emp_Report IS
pl_id ParamList;
BEGIN
/*
** Check to see if the 'tmpdata' parameter list exists.
*/
pl_id := Get_Parameter_List('tmpdata');
/*
** If it does, then delete it before we create it again in
** case it contains parameters that are not useful for our
** purposes here.
*/
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
/*
** Create the 'tmpdata' parameter list afresh.
*/
pl_id := Create_Parameter_List('tmpdata');
/*
** Add a data parameter to this parameter list that will
** establish the relationship between the named query
** 'EMP_QUERY' in the report, and the record group named
** 'EMP_RECS' in the form.
*/
Add_Parameter(pl_id,'EMP_QUERY',DATA_PARAMETER,'EMP_RECS');
/*
** Run the report synchronously, passing the parameter list
*/
Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME,
FILEYSTEM, pl_id, NULL);
END;

Copyright (c) 1994, Oracle Corporation.
Re: calling reports from forms6.0 [message #78457 is a reply to message #78348] Mon, 25 February 2002 13:30 Go to previous messageGo to next message
Wes Louissaint
Messages: 1
Registered: February 2002
Junior Member
This seems to be straightforward. I have not used it yet to see how it works, but all the componenets are in place. Thank you for providing the code
calling oracle reports with parameter form from oracle forms [message #80118 is a reply to message #78348] Tue, 13 August 2002 03:58 Go to previous message
Prasanna Kumar Das
Messages: 1
Registered: August 2002
Junior Member
sir,
Now i am using oracle application server in 3tier mode,
When i am running my application from application server, parameter form of the reports is overiding when iam calling it from the forms.

So I request to send the solution for above said problem as earlier as possible.

Awaiting for your good responce

Regards,
Prasanna..
Previous Topic: List of Values in form
Next Topic: FRM-40405 no changes to apply
Goto Forum:
  


Current Time: Thu Apr 25 11:13:57 CDT 2024