Oracle Fusion Middleware 12c

Oracle Fusion Middleware 12c-PDF Download

  • Date:31 Jul 2020
  • Views:7
  • Downloads:0
  • Pages:19
  • Size:507.57 KB

Share Pdf : Oracle Fusion Middleware 12c

Download and Preview : Oracle Fusion Middleware 12c


Report CopyRight/DMCA Form For : Oracle Fusion Middleware 12c


Transcription:

Table of Contents,Introduction 2,Oracle Forms 2,Oracle Reports 3. The Oracle Forms RUN REPORT OBJECT Built in 3,How to use RUN REPORT OBJECT 4. RUN REPORT OBJECT Examples 4,Using a Parameter List with RUN REPORT OBJECT 7. Calling Reports that Display a Parameter Form 8,Solving the Problem with PFACTION 8. Using PL SQL Functions to Encode URL Parameters 9, Building a Procedure to Call Reports with Parameter Forms 10.
Examples of How to Call the Generic Procedure 13,The Oracle Forms WEB SHOW DOCUMENT Built in 14. WEB SHOW DOCUMENT Syntax 14,Calling Reports using WEB SHOW DOCUMENT 15. Hiding the Username and Password 16,Conclusion 17, 1 INTEGRATING ORACLE REPORTS 12C WITH ORACLE FORMS 12C. Introduction, This paper discusses how to integrate Oracle Reports with Oracle Forms After reading this. whitepaper you will, Understand how to use the Oracle Forms RUN REPORT OBJECT built in.
Understand how a report is requested from an Oracle Forms application. Understand how to retrieve a completed report from Oracle Forms. Understand how to call reports which include a Reports parameter form. Understand how to call Oracle Reports from Oracle Forms when single sign on SSO is enabled. This document is intended for individuals with a working knowledge of how to write Oracle Forms. application code and understand the basic functionality in Oracle Forms and Reports on the middle. tier Some understanding of HTTP Server and WebLogic Server functionality will also be helpful The. sample code found within this document is provided for illustration and educational purposes only. This code should not be used in production applications without first performing thorough and. complete testing prior to use,Oracle Forms, Oracle Forms consists of two high level components the Oracle Forms Developer design time component aka the. Form Builder and Oracle Fusion Middleware Forms Services deployment aka Forms Runtime component For. the purpose of this document we will only be discussing those features and built ins that are necessary to call a. report from an Oracle Forms application, There are two Oracle Forms built ins which are supported for calling Oracle Reports from Oracle Forms. RUN REPORT OBJECT,WEB SHOW DOCUMENT, These built ins are explained in more detail within the Oracle Forms Builder Online help An explanation of how. these will be used to call Oracle Reports will be explained later in this paper More information about deploying. Oracle Forms can be found in the Oracle Forms Deployment Guide which is included in the Fusion Middleware. 12c documentation library on the Oracle Technology Network OTN. If your application is being migrated from an earlier version of Oracle Forms specifically version 6 x or older and the. built in RUN PRODUCT was used for Oracle Forms and Oracle Reports integration and you are not able or willing. to rewrite your code to use RUN REPORT OBJECT please refer to the documentation which discusses how to. use the Forms Migration Assistant FMA This information can be found in the Fusion Middleware documentation. library in the document titled Oracle Forms Upgrading Oracle Forms 6i to Oracle Forms 12c. 2 INTEGRATING ORACLE REPORTS 12C WITH ORACLE FORMS 12C. Oracle Reports, Like Oracle Forms Oracle Reports consists of a primary design time tool commonly referred to as the Oracle. Reports Builder and the Oracle Fusion Middleware Reports Server component for deployment The deployment. component within Fusion Middleware is referred to as Oracle Reports Services or Server Throughout this paper. the terms Reports Services and Reports Server are used interchangeably for the same component s. More information about deploying Oracle Reports can be found in the Oracle Reports deployment guide titled Publishing Reports with Oracle Reports. Services which is included in the Fusion Middleware 12c documentation library on OTN. The Oracle Forms RUN REPORT OBJECT Built in, The most secure approach for calling Oracle Reports from Oracle Forms is to use the RUN REPORT OBJECT.
built in Because the user s database connection is implicitly passed from Oracle Forms to Oracle Reports on the. middle tier server there is no risk of interception as when passed such information in a URL. Before Oracle Forms can make calls to Oracle Reports it will be necessary to set a new environment variable in the. Forms environment settings file e g default env Set COMPONENT CONFIG PATH to the fully qualified path of. the Reports Tools Component For example, COMPONENT CONFIG PATH DOMAINHOME config fmwconfig components ReportsToolsComponent reports tools component name. In Oracle Forms Builder to use the RUN REPORT OBJECT built in you will need to create a new Reports object. under the Reports node in the Object Navigator Each Reports object has a logical name which is used within. Forms to call the report from PL SQL You can optionally create a new Reports object for each physical Reports file. One Reports object can also be used with many physical Reports files The attributes of this object can be set in the. Builder s Property Palette at design time or can be set programmatically at runtime. Figure 1 Oracle Forms Object Navigator and Property Palette Note that the Reports node includes the objects MYREPORT1 REPTEST and. RP2RRO The physical Oracle Reports file referenced by the MYREPORT1 object is defined as reptest rdf The Oracle Reports runtime settings. below the Reports node in the Property Palette can be overwritten at runtime using SET REPORT OBJECT PROPERTY. 3 INTEGRATING ORACLE REPORTS 12C WITH ORACLE FORMS 12C. How to use RUN REPORT OBJECT, To access a remote Reports Server using RUN REPORT OBJECT Oracle Reports Services must be accessible. for the Report object in Oracle Forms You can do this dynamically using the. SET REPORT OBJECT PROPERTY built in or statically by entering the Oracle Reports Server name string into. the Property Palette of the Report object, It is also important to note that Oracle Forms Services and Oracle Reports Services must reside within the same. network subnet in order to work properly If they are not either the Oracle Reports Naming Service or Oracle. Reports Bridge can be used to overcome this particular configuration limitation Refer to the Publishing Reports. with Oracle Reports Services document previously mentioned for more information about using the Reports Naming. Service or a Bridge,RUN REPORT OBJECT Examples, The following example runs a report using the Oracle Forms built in RUN REPORT OBJECT Note that at this. point we are only requesting that a report be run The data retrieved i e report output will not be returned to the. end user at this point This may be desirable in some cases If so set the DESTYPE to FILE in order to. permanently store the file on the server for later use. In this example the Reports object name is MyReport1 A user defined Reports parameter p deptno is passed. using the value of the dept deptno field The parameter form is suppressed using paramform no. report id Report Object,ReportServerJob VARCHAR2 254.
report id find report object MyReport1, 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 PDF. SET REPORT OBJECT PROPERTY report id REPORT SERVER Repsrv. SET REPORT OBJECT PROPERTY report id REPORT OTHER p deptno Dept Deptno paramform no. ReportServerJob run report object report id,Figure 2 General use of RUN REPORT OBJECT. The following example uses a synchronous call to RUN REPORT OBJECT to run a report It expects the Reports. object name the Reports Server name and the desired output format PDF HTML HTMLCSS etc to be passed. as parameters It will also attempt to verify that the report was successfully generated and then display the results. to the end user in a browser The use of a procedure such as this is recommended in cases where the application is. likely to call out to Reports from various places within the application. 4 INTEGRATING ORACLE REPORTS 12C WITH ORACLE FORMS 12C. PROCEDURE RUN REPORT OBJECT PROC vc reportoj Varchar2 vc reportserver varchar2 vc runformat varchar2 IS. v report id Report Object, vc ReportServerJob VARCHAR2 100 unique id for each Report request. vc rep status VARCHAR2 100 status of the Report job. vjob id VARCHAR2 100 job id as number only string,Get a handle to the Report Object. v report id FIND REPORT OBJECT vc reportoj, Define the report output format and the name of the Reports Server as well as a user defined parameter.
Pass the department number from Forms to Reports There is no need for a parameter form to be displayed. so paramform is set to no, SET REPORT OBJECT PROPERTY v report id REPORT DESFORMAT vc runformat. SET REPORT OBJECT PROPERTY v report id REPORT DESTYPE CACHE. SET REPORT OBJECT PROPERTY v report id REPORT COMM MODE SYNCHRONOUS. SET REPORT OBJECT PROPERTY v report id REPORT SERVER vc reportserver. SET REPORT OBJECT PROPERTY v report id REPORT OTHER p deptno dept deptno paramform no. vc ReportServerJob RUN REPORT OBJECT v report id, vjob id substr vc ReportServerJob instr vc ReportServerJob 1 1. Check the report status Because this was a synchronous call REPORT COMM MODE. the status check will only return FINSIHED or an error If COMM MODE is set to asynchronous a timer. should be used to periodically change the status of the running report before attempting to display it. vc rep status REPORT OBJECT STATUS vc ReportServerJob. IF vc rep status FINISHED THEN, Call the Reports output to be displayed in the browser The URL for relative addressing is valid. only when the Reports Server resides on the same host as the Forms Server and is accessed via the same port. For accessing a remote Reports environment you must use a fully qualified URL i e http hostname port. WEB SHOW DOCUMENT reports rwservlet getjobid vjob id server vc reportserver blank. message Report failed with error message vc rep status. Figure 3 Using RUN REPORT OBJECT for integrating calls to Oracle Reports. 5 INTEGRATING ORACLE REPORTS 12C WITH ORACLE FORMS 12C. If you are upgrading from Oracle Forms or Oracle Reports 6i when calling WEB SHOW DOCUMENT you will need. to modify the Reports job ID that is retrieved by the RUN REPORT OBJECT built in so that the Reports Server. name is not included, To use the procedure described above you would pass the following information in a When Button Pressed trigger. or other appropriate trigger, RUN REPORT OBJECT PROC REPORT OBJECT REPORT SERVER NAME FORMAT.
REPORT OBJECT Forms Report object name containing the rdf filename for the Report. REPORT SERVER NAME Name of the Reports Server, FORMAT Any of these formats html html css pdf xml delimited rtf. Figure 4 Parameters needed to use RUN REPORT OBJECT PROC. A synchronous call to Reports will cause the user to wait while the report is processed on the server. For long running Reports it is best that the report be run asynchronously by setting the REPORT COMM MODE. property to asynchronous and the REPORT EXECUTION MODE to batch For example. SET REPORT OBJECT PROPERTY report id REPORT EXECUTION MODE BATCH. SET REPORT OBJECT PROPERTY report id REPORT COMM MODE ASYNCHRONOUS. After calling RUN REPORT OBJECT you must create a timer to run periodic checks on the current. REPORT OBJECT STATUS in a When Timer Expired trigger After the report is generated the When Timer. Expired trigger calls the WEB SHOW DOCUMENT built in to display the Reports output file identified by its unique. job ID to the client s browser, Here is an example of how the report status can be checked from the When Timer Expired trigger. global vc ReportServerJob needs to be global because the information about the Report job id is shared. between the trigger code that starts the report and the trigger code When Timer Expired that checks the Report status. vc rep status REPORT OBJECT STATUS global vc ReportServerJob. IF vc rep status FINISHED THEN, substr global vc ReportServerJob length reportserver 2 length global vc ReportServerJob. WEB SHOW DOCUMENT reports rwservlet getjobid vjob id server vc reportserver blank. DELETE TIMER timer id Report done No need to check any more. ELSIF vc rep status not in RUNNING OPENING REPORT ENQUEUED THEN. message vc rep status Report output aborted, DELETE TIMER timer id Report failed No need to check any more. Figure 5 Performing asynchronous call to Reports and checking its status from When Timer Expired. 6 INTEGRATING ORACLE REPORTS 12C WITH ORACLE FORMS 12C. Using a Parameter List with RUN REPORT OBJECT, With the RUN PRODUCT1 built in no longer supported for use in Oracle Forms Reports system parameters and.
user defined parameters are passed in a parameter list The same parameter lists can be used with. RUN REPORT OBJECT with the exception of the system parameters which need to be set with the. SET REPORT OBJECT PROPERTY built in,REPORT EXECUTION MODE BATCH or RUNTIME. REPORT COMM MODE SYNCHRONOUS ASYNCHRONOUS,REPORT DESTYPE FILE PRINTER MAIL CACHE. REPORT DESFORMAT HTML HTMLCSS PDF RTF XML DELIMITED SPREADSHEET. REPORT FILENAME The report filename,REPORT DESNAME The report destination name. REPORT SERVER The Report Server name, Figure 6 List of system parameters used by RUN REPORT OBJECT. If your existing parameter list already contains definitions for system parameters you may experience errors To. prevent such problems from occurring modify the parameter list itself either by removing the entries for DESNAME. Oracle Forms consists of two high level components the Oracle Forms Developer design time component aka the Form Builder and Oracle Fusion Middleware Forms Services deployment aka Forms Runtime component For the purpose of this document we will only be discussing those features and built ins that are necessary to call a

Related Books