Oracle9i Reports Building Reports Release 9.0 Part Number A92101-01 |
|
Oracle9i Reports enables you to deliver a single report to multiple destinations simultaneously. By taking advantage of this feature, you can create a single report, then send it in any format (e.g., PDF or HTML) to multiple destinations.
In this example, you will modify a simple report we've provided to burst each section to a separate report. You will then modify a sample distribution XML file to send an e-mail to each destination with an attachment based on the separate reports. You will also send multiple e-mails to the same e-mail address with a single attachment (the entire report).
Oracle9i Reports enables you to deliver a single report to multiple destinations simultaneously. Using the new, enhanced distribution feature, you can set up your report to be distributed to an e-mail destination, a portal, a printer, or anywhere else when the report is run. This feature also enables you to improve performance, since you only fetch the data once for many different formats and destinations. Using distribution also reduces your maintenance overhead because you only need one job request to publish the report to multiple destinations. You can refine this further by sending the header section to some recipients, the main to others, and the entire report to an entirely different recipient list.
For more information on bursting and distribution, see Publishing Reports to the Web with Oracle9iAS Services manual located on the Oracle Technology Network (http://otn.oracle.com) and on the documentation CD provided with Oracle9iAS.
Suppose you are the report developer for a manufacturing company who needs to deliver monthly information to its warehouses. In this example, you will modify an existing report to burst on sections, based on each warehouse ID, creating separate PDF reports for each warehouse. You will then edit the distribution XML file we've provided to e-mail each section as an attachment to individual warehouses.
To build the examples in this manual, you must have the example files we've provided, as well as access to the sample schema that is shipped with the Oracle9i database.
If you haven't already done so, you can download the files you'll need to complete this example from the Oracle Technology network (http://otn.oracle.com/products/reports) and install them on your machine.
Distribution.zip
into a temporary directory on your machine (e.g., "d:\temp").
d:\orawin90\examples
).
This zip file contains the following files:
If you don't know if you have access to the sample schema provided with the Oracle9i database , contact your database administrator. You should have access to the "Order Entry" portion of the schema to complete this example.
For the purposes of this chapter, we've provided you with an RDF file you can use for bursting. When you open this report, you should also connect to the sample schema in your database by choosing File > Connect. If you don't know the connection information for the "Order Entry" portion of the schema, contact your database administrator.
In this section, you will set up a repeating frame so that the data bursts on each warehouse ID. This way, you can later send the data resulting from each section as a report to each individual warehouse.
inventory_report_dist.rdf
.
The report displays in the Object Navigator.
For more information on frames and repeating frames, refer to the Reports Builder online help.
The Property Inspector for the Main Section displays.
You can set the Repeat On property by clicking the drop-down list, then selecting the item.
inventoryreport_dist_<your initials>.rdf
.
You have set up your report to burst based on the warehouse ID.
The Oracle9i Reports distribution XML file enables you to specify the details of your distribution. For example, if you're distributing via e-mail, you can specify such details as the addressee, the reply to address, and the subject.
In this section, we'll show you how to modify a distribution XML file. We've indicated locations where you need to enter your own information to make the distribution work. Note that you can save this distribution.xml file to use later, so that you don't have to manually create another file every time you want to use distribution. Our sample file also contains comments that might come in handy later.
When you want to distribute a report, you need to either:
OR
We've provided both these files in a single directory: Examples/Distribution/source/.
For more information on distribution, see the Publishing Reports to the Web with Oracle9iAS Reports Services manual available on the Oracle Technology Network (http://otn.oracle.com).
distribution.xml.
<YourFilePath>
, and replace it with the location of where your resulting PDFs will be stored.
Example: Replacing the placeholder text with:
d:\temp\
changes the path to:
d:\temp\Rep_%amp;<city>.pdf
Using this complete path would place the resulting PDF files in your d:\temp directory.
<OriginEmailAddress>
, and replace it with the sender's e-mail address.
<OriginEmailAddress>
.
<DestinationEmailAddress>
, and replace it with the first recipient's e-mail address.
<DestinationEmailAddress>
.
You have finished customizing the distribution XML file to send a single e-mail to corporate headquarters with all of the individual warehouse reports, and multiple e-mails with a single attachment each to the individual warehouses.
Since this example is a Web report, you can distribute it from either the command line or using your Web browser. For both methods, the following parameters apply:
<YourPath> is where your RDF file is located and where your distribution.xml file is located. Your login ID and Reports server name is your login information for the sample schema you've used with the sample RDF.
From the command line
Type the following text in the command line:
RWRUN REPORT=<YourPath>/inventoryreport_dist_<YourInitials> USERID=<Your Login ID> SERVER=<Your Server Name> DISTRIBUTE=YES DESTINATION=<YourPath>/distribution.xml
Using a URL
Type the following text in the Location field of your browser:
../RWSERVLET?REPORT=<YourPath>/inventoryreport_dist_<YourInitials>&USERID=<Your Login ID>&SERVER=<Your Server Name>&DISTRIBUTE=YES&DESTINATION=<YourPath>/distribution.xml
Running the report creates a file for each warehouse based on the warehouse ID in the specified directory. When the report is distributed, a single e-mail is sent to one address with all of these files attached to the e-mail.
If you set up the distribution.xml file for multiple e-mail addresses, each warehouse (or each e-mail address) would be sent a single e-mail with a single attachment file that includes the report for that warehouse.
Congratulations! You have distributed a report. You now know how to:
|
![]() Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|