Oracle® Application Server Reports Services Publishing Reports to the Web
10g Release 2 (10.1.2) B14048-02 |
|
Previous |
Next |
Two things to consider when you run a report are how the report should be output (destination) and who should receive it (distribution). Distribution is discussed in Chapter 15, "Creating Advanced Distributions". This chapter explores how OracleAS Reports Services handles output processing to default and custom destinations. It provides an overview of output processing and information on registering destination types with the OracleAS Reports Services.
It includes the following sections:
Report output is controlled by the DESTYPE
value that you specify at runtime, which, in turn, is determined by the destination output types you have registered in your server configuration file (server_name
.conf
) using the destination
element. For more information, see Section A.3.29, "DESTYPE" and Section 3.2.1.7, "destination".
You do not need to register the following default destinations:
Cache
Printer
File
You may need to register the following default destinations:
OracleAS Portal: The entry for this destination is created by default in the server configuration file, but it is commented out. To start using this destination, you must uncomment the destination
entry, and also provide appropriate property values (for example, the value for the portalUserid
property).
FTP and WebDAV: The entries for these destinations are created by default in the server configuration file, and are not commented out. Thus, they are registered and available by default. If you need to send the output to an FTP or WebDAV server that requires a proxy, you will need to edit the proxyinfo.xml
file available in the default location (ORACLE_HOME
\reports\conf
), then uncomment the proxy
property in the destination
element and specify the complete path to the proxyinfo.xml
file as the value. For example:
<destination destype="ftp" class="oracle.reports.plugin.destination.ftp.DesFTP">
<
property name="proxy" value="D:\\oracle\\reports\\conf\\proxyinfo.xml"
/>
</destination>
You can also define custom output types, such as fax, Oracle's Internet File System (iFS), or any new destination type you define using the OracleAS Reports Services Destinations API. This API enables you to define new destination types and build handlers to usher your reports to custom destinations.
Note: For more information on the available APIs for Oracle Reports, refer to the Reports Software Development Kit (RSDK) on the Oracle Technology Network (OTN): on the Oracle Reports 10g page (http://www.oracle.com/technology/products/reports/index.html ), click SDK.
|
The OracleAS Reports Services architecture standardizes the way output is generated and delivered. It takes responsibility for delivering report output to the appropriate destination (through the Reports Server), yet generates output independent of its destination (through the Oracle Reports engine). This provides a significant improvement in efficiency by allowing one run of a report to be used in a number of different ways. It also opens up the output processing architecture to allow for any number of destination types.
In the past, the Reports Runtime engine was totally responsible for delivering the output. Consequently, it had to know how to communicate with output destinations. This resulted in a tight coupling between the engine and the supported destinations.
OracleAS Reports Services eliminates this tight coupling and its attendant restrictions. The runtime engine now treats all destinations alike. It doesn't need to know the destination type for which the output is being produced. The server hands output off to destination handlers that prepare the material for delivery to their associated destination types. You can use predefined destination types (with predefined handlers) or create a handler for a custom destination type you intend to support. Almost any type of destination can be plugged into Oracle Reports.
Figure 8-1 illustrates the main components of the OracleAS Reports Services output processing architecture.
Figure 8-1 Main components of destination/distribution architecture
Requests flow through the output processing architecture in the following sequence:
The user submits a request from a client or browser to the Reports Server.
The server passes it along to the runtime engine.
The runtime engine creates/processes the destination objects (which include file lists for specific destinations as well as any properties related to those destinations) and the report output; the runtime engine sends the destination objects to the Reports Server and the report output to cache.
The Reports Server sends the destination objects to the Reports Server's destination component.
The destination component of the Reports Server fetches the report output from cache.
The Reports Server destination component sends the report and the destination objects (which specify how the destination device should handle the output) to the appropriate destination handler.
Before OracleAS Reports Services can send a report to a particular destination type, the type must be a default type (printer, e-mail, cache, or file) or a type registered in the server's configuration file, server_name
.conf
. The configuration file contains a destination
element for registering destination types that are valid for your reports. You can register anywhere from zero to any number of destination types.
Registering a destination type with the server involves:
These tasks are described in the following sections.
To set up a destination section in the server_name
.conf
file:
Open the server configuration file with your preferred text editor.
You'll find the server configuration file in the following directory (Windows and UNIX use the same path):
ORACLE_HOME\reports\conf\server_name.conf
If the configuration file does not have a destination
section, create one underneath the element that precedes it in the configuration file's data type definition file (rwserverconf.dtd
) section.
Note: The server configuration file follows the order of elements defined in the file's related document type definition file (ORACLE_HOME \reports\dtd\rwserverconf.dtd ). Place destination after the elements that precede it, whichever are present in your server configuration file.
|
Use the following syntax to register all the destination types you will use for outputting reports:
<destination destype="output_type_1" class="java_class_1"> <property name="valid_destype_property" value="valid_value"/> <property name="valid_destype_property" value="valid_value"/> </destination> <destination destype="output_type_2" class="java_class_2"> <property name="valid_destype_property" value="valid_value"/> </destination>
The valid values for these tags are discussed in the following sections.
This section outlines the destinations supported by Oracle Reports.
The destype
and class
attributes are required for valid registration of a nondefault output type. They specify the destination types and their associated Java classes. The predefined (default) destination types and classes that come with OracleAS Reports Services are listed in Table 8-1:
Table 8-1 Standard Destination Types and Classes
Destination | destype | Class |
---|---|---|
OracleAS Portal content area |
|
|
SMTP-compliant e-mail |
|
|
file |
|
|
cache |
|
|
printer |
|
|
FTP |
|
|
WebDAV |
|
|
You are not limited to the predefined destypes and classes provided with the server. You can register custom destination types, such as a fax, once you have defined a custom handler (through the Destinations API).
Note: For more information on the available APIs for Oracle Reports, refer to the Reports Software Development Kit (RSDK) on the Oracle Technology Network (OTN): on the Oracle Reports 10g page (http://www.oracle.com/technology/products/reports/index.html ), click SDK.
|
The server configuration file allows the association of an unlimited number of properties with a registered destination. Destination properties consist of name/value pairs that define some aspect of an output type's configuration. They are expressed in terminology recognized by the destination type. For example, a destination with a destype of oraclePortal
would recognize the name/value pair:
<property name="portalUserid" value="portal_id/portal_password@portal_schema" confidential="yes" encrypted="no"/>
This example defines the values to be associated with a portal user ID. It includes the attributes confidential
and encrypted
:confidential="yes"
, which indicate that the values within this element should be encrypted; encrypted="no"
, which indicates that the values are not yet encrypted. The next time the Reports Server starts, it will automatically encrypt the values and reset encrypted
to yes
.
Note: Elements and attributes allowable in server configuration file are determined by the syntax defined in therwserverconf.dtd file (ORACLE_HOME \reports\dtd\rwserverconf.dtd ). This is discussed in detail in Chapter 3, "Configuring OracleAS Reports Services".
|
What is valid for a destination type's properties depends entirely on the destination type. These values do not come from Oracle Reports and are not put to use by the Reports Server. They come from the destination type itself and use terms the destination recognizes. It is up to the developer to understand the requirements of a custom destination and to know what properties to associate with a given custom output type.
When we begin to discuss distribution, you may note that within the distribution XML file, the destype
element also allows for the use of property name/value pairs. It's important to make a distinction between properties entered for a destination
element in the server configuration file and those entered for a destype
element in the distribution XML file:
Properties entered for a destination
element in the server configuration file should deal only with configuring an output type, for example setting an allowable number of retries for a destination fax.
Properties entered for a destype
element in the distribution XML file should deal only with specifying a runtime parameter, for example the identity of the fax's intended recipient.
The following example illustrates a destination
element for pushing content into OracleAS Portal:
<destination destype="oraclePortal" class="oracle.reports.server.DesOraclePortal"> <property name="portalUserid" value="<the_username_password_tnsname_for_logon_to_portal>" encrypted="yes"/> </destination>