D17366GC10 - SG Oracle
D17366GC10 - SG Oracle
D17366GC10 - SG Oracle
Student Guide
D17366GC10
Edition 1.0
November 2005
D22487
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Ellen Gravina
Disclaimer
Technical Contributors
and Reviewers
Alan Paulson
Charles Bryant
Gayathri Rajagopal
Kathryn Cunningham
Laurent Dereac
Maha Yasir-Shihadih
Mark Fleming
Navneet Singh
Philipp Weckerle
Ratheesh.Pai
Raza Siddiqui
Sarah Spicer
The information contained in this document is subject to change without notice. If you
find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Restricted Rights Notice
If this documentation is delivered to the United States Government or anyone using
the documentation on behalf of the United States Government, the following notice is
applicable:
U.S. GOVERNMENT RIGHTS
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or
disclose these training materials are restricted by the terms of the applicable Oracle
license agreement and/or the applicable U.S. Government contract.
Smitha Keshav
Trademark Notice
Ted Witiuk
Vince Casarez
Editors
Elizabeth Treacy
Richard Wallis
Publisher
Nita Brozowski
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Author
Introduction
Objectives I-2
Oracle Reports Curriculum Map I-3
Course Objectives I-4
Course Content I-5
Summary I-7
1
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Contents
iv
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
A Practices
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Introduction
Overview
This lesson introduces you to the Oracle Reports Developer 10g: Move to the Web course.
Specifically, youll learn:
How the course fits in the Oracle Reports curriculum
The objectives that the course intends to meet
The topics that it covers
How the topics are structured over the duration of the course
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Objectives
Application Server
Administrator
Experienced
6i Reports Developer
Developer
(New to Reports)
Oracle Application
Server 10g:
Admin I (D16508GC11)
Admin II (D16509GC10)
10
Oracle
Reports Developer 10g:
Move to the Web
(D17366GC10)
2
Oracle
Reports Developer 10g:
Build Reports
(D17075GC10)
5
Oracle Application
Server 10g Release 2:
New Features
for Administrators
(D17419GC10)
3
Oracle
Reports 10g
Oracle By Example
Tutorials
Instructor-led training
Web-based training
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Course Description
This course introduces you to the benefits that you and your organization can achieve when you
deploy Reports applications to the Web with Oracle Application Server 10g. You learn to
migrate your applications to the Web and to adapt them to the Web environment. You also
utilize new Web technologies and product features to enhance your Reports applications.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Course Objectives
Day 1
Lesson 1: Why Move Reports Applications to the
Web?
Lesson 2: Migrating Reports Applications
Lesson 3: Developing Reports for the Web
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Course Content
Day 2
Lesson 4: Using New Features in Oracle Reports:
Development
Lesson 5: Deploying Reports Using OracleAS
Reports Services
Lesson 6: Using New Features in Oracle Reports:
Deployment
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Course Content
Summary
In this introductory lesson, you should have learned how the course Oracle Reports Developer
10g: Move to the Web fits with the other Oracle Reports curriculum offerings. You should also
have learned about the course objectives, content, and structure.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Overview
You are probably wondering why you should move your client/server reports applications to the
Web. What can you accomplish on the Web that you couldn't do in the client/server
environment?
This lesson introduces you to the key benefits of migrating your Oracle Reports applications to
the Web.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Objectives
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Multiple PCs
Reducing Costs
Oracle Reports applications are deployed on the Web with Oracle Application Server 10g: a
single, integrated product that is designed to lower the total cost of ownership associated with
developing, deploying, and managing applications.
With Web deployment, you eliminate the costs associated with maintaining software on all the
clients. You have to manage only the server.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Reducing Costs
New
New
Developer
User 1
New
User 4
New
New
User 3
User 2
Improving Productivity
The key to reducing development time is to take the element of intensive effort out of report
development. Oracle Reports does not require that you write numerous lines of code or manually
format complex layout structures. As a developer, you will continue to use the wizard-driven
application development environment of Reports Builder, even for Web reports.
Oracle Reports 10g takes advantage of JavaServer Pages (JSP) technology to deliver high-quality
HTML pages for Web publishing. JSP technology separates the dynamic portion of your Web
page from the static HTML. This enables Web page designers in your organization to create the
visually appealing, static portion of the page by using their favorite Web-authoring tool. Page
designers who have limited or no Java programming experience can modify the appearance of
the JSP page without affecting the generation of its content. You, as the application developer,
need to focus only on adding the dynamic data component to the page.
You can develop a report once and deploy it to multiple destinations. You can select various
output formats, including HTML, Hypertext Markup Language with a Cascading Style Sheet
(HTMLCSS), Extensible Markup Language (XML), PDF, Postscript, and rich text format (RTF).
You can share a single data model among all output formats. In addition, you can customize the
appearance and content of your output at run time by applying XML customization files.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Improving Productivity
Suppliers
Office
workers
Telecommuters
Customers
Increasing Availability
As soon as a new report application is deployed on the Web, it is instantly available to users who
log in to the application. You can easily modify a Web-deployed application without affecting
the accessibility to customers and vendors. For example, you can modify an order listing so that
customers can view the status of their orders online. Because you need not install the modified
application on every client, it is instantly accessible over the Web.
With a Web application that is accessible anywhere, you can reach customers that you could
never reach before, and you can enable internal users to connect to applications from home with
only a browser. Using the capabilities of Oracle Application Server 10g, you can also make your
report accessible through a Web portal or on a cell phone.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Increasing Availability
Maintaining Support
Oracle Reports has maintained its position as a premier enterprise-reporting tool by keeping pace
with rapid shifts in technology. As rapidly as technology has shifted, Oracle Reports has moved
from character-based, to graphical-based, to client/server, and now to multitier Web-based
development and deployment.
Oracle Reports 6i was the last version of Oracle Reports to support both a character-mode and a
client/server GUI reports viewer. With Oracle9i Reports, users moved to a Java 2 Enterprise
Edition (J2EE) Web-based multitier environment. Oracle Reports 10g (9.0.4) and Oracle Reports
10g Release 2 (10.1.2) have improved the performance and scalability of reports applications in
the Web-based environment and have also provided a host of new features.
If you continue to use client/server deployment, you must continue developing report
applications using Oracle Reports 6i, whose support term is limited. It is recommended that you
upgrade to Oracle Reports 10g Release 2, a component of Oracle Developer Suite 10g. This will
assure you continued technical assistance, bug resolution, and access to updated patches.
Visit Metalink (http://metalink.oracle.com) for the latest information on the desupport dates for
Oracle6i Reports and Oracle9i Reports.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Maintaining Support
JDBC
OLAP
XML
TEXT
<your data source>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
JSPs
XML
Servlets
J2EE
PL/SQL APIs
CORBA
Java APIs
IIOP
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Leveraging a Standards-Based
Architecture
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Design time
enhancements
Integration
Data source
Paper layout
JSP Web
source
Developers
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Distribution
Server
APIs
Security
Developers
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Reports
Services
Reports
Developer
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
A component of Oracle
Application Server that
deploys Reports
applications in Web and
non-Web environments
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Application Development
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Business Intelligence
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
In this lesson, you should have learned that:
Migrating Oracle Reports applications to the Web enables you to realize improved
productivity, cost reduction, and increased accessibility to your applications while enabling
you to leverage the latest technologies and utilize all the new product features.
Oracle Application Server10g provides the infrastructure to easily develop, deploy, and
manage Internet applications and Web sites. Oracle Application Server 10g is a
comprehensive and integrated application server that runs any Web site, portal, or Internet
application. It provides all the middleware services you need to deploy and manage Oracle
Reports applications. OracleAS Reports Services, the reports publishing component of
Oracle Application Server, produces high quality production reports that dynamically
retrieve, format, and distribute any data, in any format, anywhere.
Oracle Application Server 10g provides additional services for deployment, including
single sign-on, management services with Enterprise Manager, an HTTP server, and a
servlet container for running the Reports servlet.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
Practice 1: Overview
For solutions to this practice, see Appendix A, Practice Solutions.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 1: Overview
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 1
1. Become familiar with Oracles software development strategy for Oracle Reports by
reviewing the document Oracle Forms Oracle Reports Oracle Designer Statement of
Direction. You can access this document on the Reports home page of the Oracle
Technology Network (http://www.oracle.com/technology/products/reports/index.html).
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Overview
Successful businesses know that presenting data in a timely and meaningful way provides a
powerful advantage over the competition. To that end, businesses continue to need ever more
powerful tools for producing high-quality reports from the mass of disparate data sources kept in
every major corporation today.
Oracle Reports has maintained its position as a premier enterprise reporting tool by keeping pace
with rapid shifts in technology. As technology has shifted, Oracle Reports has moved from
character-based, to graphical-based, to client/server, and now to multitier Web-based
development and deployment.
In this lesson, you learn about the features that are deprecated, obsolete, or changed in Oracle
Reports 10g. You also learn how to migrate existing reports that use some of these features.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Objectives
Deprecated functionality
is no longer
documented and its use
is discouraged.
Obsolete functionality
has been removed from
Oracle Reports and
replaced with new
technology.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
10g
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
March 7th
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
To modify this report for 10g, edit your format trigger and use the new built-in functions as
follows:
if :salary > 2000 then
srw.set_font_face(times);
srw.set_font_size(18);
srw.set_font_weight(srw.bold_weight);
srw.set_font_style(srw.underline_style);
srw.set_text_color(blue);
end if;
return(TRUE);
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle6i Reports
Migrating Charts
To add charts to your reports in Oracle6i Reports, you used Oracle Graphics. Oracle Graphics, or
Graphics Builder, is no longer supported. Since release 9i, Oracle Reports uses Business
Intelligence Beans (BI Beans) to create and display graphs in reports. There is no direct
migration path from Oracle Graphics to the BI Beans graphing functionality. There is no separate
graphics tool; all of the graphing options and controls are now available in Reports Builder
through the Graph Wizard. You must re-create all of your graphs by using the new Graph
Wizard in Oracle Reports Builder 10g. The wizard produces a graph definition that consists of
XML information and a JSP tag to enable you to add graphics to Web reports. Using the Graph
Wizard, you can generate more complex graphs with a larger variety of graph typesover 50,
including three-dimensional (3-D) graphs. You learn more about the Graph Wizard in the lesson
titled Using New Features in Oracle Reports: Development.
Note: Reports built with previous versions of Oracle Reports containing Oracle6i Graphics
charts will continue to run when the report is opened in Oracle Reports 10g Release 2 (10.1.2) if
the Oracle6i Graphics Runtime is installed on the same machine in a separate ORACLE_HOME.
However, this is not a supported configuration, and Oracle will not fix bugs that result from this
configuration.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Migrating Charts
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Replacing Buttons
Buttons were used in a client/server environment to enable users to interact with a report in the
Previewer at run time. You created buttons to:
Access a URL
Drill down to a separate detail report
Display multimedia information related to report items
Because Oracle Reports no longer has a GUI viewer, button functionality is not supported. If you
open an existing 6i report that contains buttons, the buttons are displayed as simple text objects.
In 10g, use URLs, links, and parameters to drill down to detailed reports and access multimedia
objects such as sound and video.
Hint: If you want to preserve the look of a button in your migrated reports, include an image as
the object with the associated link.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Replacing Buttons
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
System Parameter
BACKGROUND: Specifies
whether a report on the
server should be run
synchronously (NO) or
asynchronously (YES)
Alternative Option
Use BACKGROUND as a command line keyword.
THOUSANDS: The
thousands character to be
used in number formats
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Java Importer
ORA_FFI built-in package
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Reports Executables
Executables that were applicable only to client/server environments were rendered obsolete
beginning with Oracle9i Reports. In addition, some executables have been replaced with new
executables to provide more comprehensive functionality.
rwrbe60 (Reports Background Engine): Report requests could be directly submitted to the
background engine. Beginning with Oracle9i Reports, all reports are executed through the
Reports Server. There are no more direct calls to the Reports Engine. As a result, the
background engine is no longer needed. Action required: Submit report requests to the
Reports Server.
rwisv60 (Interactive Server): This executable was used to submit reports to the Reports
Background Engine for execution. Because the background engine is no longer available,
this executable is not needed. Action required: Submit report requests to the Reports
Server.
rwows60: The Oracle Application Server cartridge was used to submit requests to the
Reports Server through the Web. Because the same functionality is available through the
J2EE-standard servlet and JSP URLs, the cartridge is no longer needed. Action required:
Use the servlet or a JSP URL to submit reports requests on the Web.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Reports Executables
As you learned earlier in this lesson, Oracle Graphics is no longer supported. Instead,
Oracle Reports uses BI Beans to create and display graphs in reports. Action required: Use
the new Graph Wizard in Reports Builder.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Number formatting
CURRENCY
THOUSANDS
DECIMAL
Tracing
PROFILE
ERRFILE
LOGFILE
Key strokes
KEYOUT
KEYIN
Action Required
Set the NLS_CURRENCY environment variable.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Obsolete Keyword
Action Required
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
In this lesson, you learned the difference between deprecated and obsolete functionality in
Oracle Reports. You learned about the features that are deprecated, obsolete, or changed in
Oracle Reports 10g.
You learned that to migrate a report developed with a previous release of Oracle Reports, you
open the report in Oracle Reports Builder 10g, replace the deprecated and obsolete functionality,
recompile any PL/SQL, and save the report definition.
You also learned how to migrate existing reports that use some of the deprecated and obsolete
functionality by replacing this functionality with new technology.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
Practice 2: Overview
Your company has recently upgraded from Oracle6i Reports to Oracle Reports 10g. In this
practice session, you migrate a report to the new release, replacing deprecated and obsolete
functionality with new functionality.
For solutions to this practice, see Appendix A, Practice Solutions.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 2: Overview
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 2
1. Your company has recently upgraded to Oracle Reports 10g. Your team is migrating
reports developed with release 6i to release 10g. Your manager has asked you to migrate
the corporate directory report. Identify potential problems in the report due to deprecated
and obsolete functionality. To ensure a smooth migration to release 10g, replace the
deprecated and obsolete functionality using the new functionality.
Save the report as migrated.rdf. Generate the output to a PDF file using Reports
Builder. View the PDF output in your browser, testing the new functionality.
a. Open the report deprecated.rdf. Run the paper layout to become familiar with
the report. Be sure to scroll to the bottom of the report. Which aspects of the report do
you need to investigate?
b. Examine the format trigger on the Phone Number field. Replace the deprecated
SRW.SET_ATTR functions with the new built-in procedures so that the report output
looks the same. Use the Reports Builder online Help to identify the built-in
procedures.Save your report as migrated.rdf. Run the paper layout to test your
changes.
c. Buttons are obsolete in Oracle Reports 10g and display as boilerplate text in the Paper
Design view. Replace the boilerplate text in deprecated.rdf with the
phone.gif image. Modify the properties of the image so that when the user clicks
the image, the report drills down to the report referenced in the button action trigger.
d. Save your changes to migrated.rdf. Generate the output to a PDF file. Open
your output in a browser window and ensure that the obsolete button functionality has
been successfully replaced.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Overview
Modern IT environments are all about online services that are based on Web technology and
focused on browser-based delivery of information. Although you can still publish your paper
reports as PDF or HTML documents, reports today often need to be published as true Web pages
that blend into your corporate Web site, inheriting the look and feel of the other Web pages.
Oracle Reports 10g takes advantage of JavaServer Pages (JSP) technology to deliver high-quality
HTML pages for Web publishing. Using the Oracle Reports reporting paradigm of a JSP-based
Web source, you can meet all the needs of dynamic Web publishing.
In this lesson, you are introduced to JSP technology, learn how to create a Web report using the
Report Wizard, and learn how to use the Web Source view of the Report Editor. You learn how
to add dynamic report content to an existing Web page. You also learn how to create both a
template and an HTML parameter form for Web reports.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Objectives
GIF89a
hyperlinks
JavaScript
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Web Publishing
8.5
GIF89a
11
hyperlinks
JavaScript
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Paper Publishing
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
JavaServer Pages (JSP) technology allows Web designers and developers to rapidly develop and
easily maintain information-rich, dynamic Web pages that leverage existing business systems.
Oracle Reports introduced JSPs as the underlying technology with which you build and publish
dynamic reports for the Internet. You can extend your Web pages by embedding Oracle Reports
custom JSP tags and your own data-driven Java components into an HTML document. You can
integrate Reports custom JSP tags with Reports data model objects and other Reports tags to add
dynamic report output to your Web page. These tags use the data model, stored in XML, to
produce dynamic output, or invoke JavaBeans that use the data model to create their results. For
example, the 3-D graphing component uses a custom tag that passes Reports data to the BI
Graph Bean, which creates an image of the graph. The 3-D graphics custom tag then returns
HTML that references the created image.
Reusable components and the open architecture of Oracle Reports makes previously difficult
tasks simple to implement. The ability to incorporate existing Java components into a report
using JSP and servlet technology provides openness. You can also share business components
between Oracle Reports and other applications within your organization.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Server-side technology
Dynamic scripting capability for Web pages
Enables the separation of dynamic and static
content in a Web page
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
JSP Advantages
JSP technology enables the rapid development of Web-based applications that are platform
independent. Using JSP technology, you can separate the dynamic portion of your Web page
from the static HTML.
Organizations typically have a team of Web designers and developers to create visually
appealing and effective Web pages for publishing. The separation of user interface and program
logic in a JSP page allows for a very convenient delegation of tasks between Web designers and
developers. Web designers can build the static portion of the page using their favorite Web
authoring tool, and change the overall page layout without altering the underlying dynamic
content. You, as an application developer, can add the dynamic data component to create flexible
code that can easily be updated and reused.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
JSP Advantages
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
<HTML>
<HEAD><TITLE>Simple HTML Example</TITLE></HEAD>
<BODY>
Welcome to my page!! <br>
Current time is :
</BODY>
</HTML>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
<HTML>
<HEAD><TITLE>Simple JSP Example</TITLE></HEAD>
<BODY>
Welcome to my page!! <br>
Current time is :
<%= new java.util.Date() %>
</BODY>
</HTML>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Two options:
Use the Report Wizard to create a new report.
Open an existing HTML page in Reports Builder
and embed Oracle Reports data.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Reports JSP
custom tag
library
Start of report
Data model
information
HTML template
information
End of report
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
A JSP tag is a Java class that encapsulates functionality, such as conditional logic, or database
access, and can be used in a JSP. The use of JSP tags keeps the JavaServer Pages manageable
and easy to read. You do not have to write a lot of inline Java code. You only need to reference a
JSP tag. When a .jsp file is run, each tag is substituted with the corresponding code.
JSP 1.1 supports custom tag libraries. You can write your own set of tags and reference them
within your JSPs. A set of custom JSP tags has been created for Oracle Reports to facilitate the
development of Reports JavaServer Pages. These tags hide the intricacies involved in querying
data from the respective data sources, accessing the data model break group cursors, and
retrieving and formatting data from report columns and parameters.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
rw:report
rw:objects
rw:foreach
rw:field
rw:include
JSP Tags
The standard JSP tags, taglib and page, are required in the definition of a report module.
<taglib>: To use the custom tags in a Reports JSP, a declaration identifying the custom tag
library must be included. This declaration, called the taglib directive, also identifies the
custom tag prefix letters. In Oracle Reports, the custom JSP tags are prefixed with rw. The
custom tag library is declared in the first line of the Web source:
<%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
<page>: This tag identifies the scripting language, the Java classes to import, and the JSP
to display for any unhandled run-time errors:
<%@ page language="java" import="java.io.*"
errorPage="rwerror.jsp" %>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
JSP Tags
The table below lists some of the custom JSP tags commonly used in Oracle Reports:
Custom JSP Tag Definition
rw:report
Delimits a report object within a JSP. All other Reports
custom tags must exist within the scope of this tag.
rw:objects
Encapsulates the XML definition for the report data
model and paper layout
rw:foreach
Indicates a loop through the data source group object
rw:field
Provides formatting functionality to render a single
value source object (a column, user parameter, or system
parameter) in HTML
rw:include
Provides for the formatting of any top level layout
object into HTML output. This tag is used to reference
a paper layout within a Reports JSP.
rw:graph
Provides a graph definition in XML
Technical Note
For a complete list of Reports custom JSP tags, refer to the Reports Builder online help.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
You can modify a Web report using the reentrant feature of the Report Wizard just as you did for
paper reports. The wizard preserves the data source definition and the layout settings that you
specified when you last used the wizard. You can make changes to these and other settings, and
then click Finish when you are ready to reapply the wizard settings to your Web report.
Saving Your Web Report Definition
The preferred format for saving a Web report is Reports JSP (*.jsp) and not HTM or HTML.
The reason for this is that certain Web servers (for example, Apache) see the HTML extension,
assume the document is static, and simply return the document to the browser without ever
executing the JSP code it contains. Furthermore, if your Web report has a .jsp extension, it is
also recognizable to Java development environments, such as Oracle JDeveloper, and you can
utilize the Java debugging tools available in these environments.
Technical Note
A Reports JSP contains the full definition of your report module. However, Reports Builder
encapsulates a lot of the code in the Web Source view. You can view the JSP file outside the
Builder using a text editor and see much moredata source, data links, layout, and so forth.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Example (continued)
Modifying a Web Report Using the Report Wizard
Generating Output
To preview your Web report in a browser, do one of the following:
Use the Run Web Layout button on the horizontal toolbar.
Select Program > Run Web Layout.
To run a report from a browser, use a URL syntax. You can give your users the URL syntax
needed to make the report request from their browser, or you can add the URL syntax to a
Web site as a hyperlink. You will learn about the URL syntax to run your Web reports in
the lesson titled Deploying Reports Using Reports Services.
Another way to publish a report on the Web is to create an OracleAS Portal component. The
OracleAS Portal component enables you to add a link to a report in an OracleAS Portal page
or portlet, or to output report results directly into a portlet. You learn about publishing your
reports in OracleAS Portal in the lesson titled Using New Features in Oracle Reports:
Deployment.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Generating Output
</body>
Data model
Web source
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Remember that every report has a data model and a layout. In Oracle Reports, each report
definition can have a paper layout and a Web layout. Although the layouts are distinct objects,
the data model is shared by both layouts.
Open the existing HTML file in Reports Builder. To define a data model for the Web page:
1. In the Object Navigator, double-click the Data Model node to display the Data Model view
of the Report Editor.
2. Right-click in the Data Model painter area and select Data Wizard from the shortcut menu.
3. Name the query as required.
4. Select the Query type.
5. Enter the query as you would using the Report Wizard.
6. Create additional groups as required.
7. Create summaries as required.
Saving Your Report as a JSP File
1. With your report selected in the Object Navigator, select File > Save As.
2. Make sure the file type is Reports JSP (*.jsp), modify the report name if desired, and
click Save.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Example:
<p><Replace this text with a report block.></p>
Note: < and > represent the less-than (<) and greater-than (>) signs, respectively.
Reports Builder encodes them in the Web Source to ensure that a browser does not misinterpret
the symbols as HTML elements. The line of code would actually read:
<p><Replace this text with a report block.></p>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Technical Note
You can use the Report Block Wizard to insert multiple report blocks that share one or more data
columns between them. In this case, the generated JSP tags end up with duplicate IDs. These
duplicate IDs cause a JSP compilation failure and the report cannot execute. As a work around
for this issue, manually edit the source code in the Web Source view and make the tag IDs
unique.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
<rw:report id="report">
<rw:objects id="objects">
Data Model & Business Logic (XML)
<layout>
Paper Layout (XML)
</layout>
</rw:objects>
<HTML>
Web Layout (JSP)
Graph (XML)
</HTML>
</rw:report>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
...
<rw:foreach id="R_G_EMPLOYEE_ID_1" src="G_EMPLOYEE_ID">
<tr>
<td <rw:headers id="HFEMPLOYEEID"
src="HBEMPLOYEEID"/>. . .
<td <rw:headers id="HFEmployee"
src="HBEmployee"/> . . .
...
rw:foreach Tag
The rw:foreach tag loops through the specified data source group. The tag creates a cursor
for the data source group and moves the cursor to the next instance for each iteration. Consider
this example:
<rw:foreach id="R_G_EMPLOYEE_ID_1" src="G_EMPLOYEE_ID">
R_G_EMPLOYEE_ID_1 is a unique identifier for the loop. G_EMPLOYEE_ID identifies the
group in the data model for which the loop repeats.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
rw:foreach Tag
...
<td <rw:headers id="HFEMPLOYEEID"
src="HBEMPLOYEEID"/> class="OraCellNumber">
<rw:field id="F_EMPLOYEE_ID" src="EMPLOYEE_ID"
nullValue=" "> F_EMPLOYEE_ID </rw:field></td>
...
rw:field Tag
The rw:field tag returns a value from a column, system parameter, or user parameter, and
outputs the value in HTML. For example:
<rw:field id="F_EMPLOYEE_ID" src="EMPLOYEE_ID"
nullValue=" "> F_EMPLOYEE_ID </rw:field>
F_EMPLOYEE_ID is a unique identifier for this field. This tag returns a value from the
EMPLOYEE_ID column in the data model, as identified by the src (source) attribute. If the tag
returns null, a space will result in the output, as specified by the nullValue attribute. The
  value is the code for nonbreaking space. It is called nonbreaking so that the browser
does not ignore the space, which browsers usually do otherwise.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
rw:field Tag
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
<rw:style id="rwbeige">
<link rel="StyleSheet" type="text/css" href="rwbeige.css">
</rw:style>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
The attributes defined are the color of the field text, background color of the field, font, font size,
and text alignment.
To customize the appearance of a class in all your reports, edit the class format settings in the
style sheet.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
<thead>
<tr>
<th <rw:id id="HBEMPLOYEEID" asArray="no"/>
class="OraColumnHeader"> Employee Id </th>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
breakLevel
breakValue
nullValue
containsHtml
formatMask
formatTrigger
breakLevel: The frequency at which the field should be repeated. It is the name of an
enclosing rw:foreach tag.
breakValue: The string value to use when the field is not repeated at the specified
breakLevel. The default value is  .
nullValue: This sets the value to be used if the fields value is null. The default value is
 .
containsHtml: A value that indicates whether the fields value contains HTML.
Accepted values are Yes and No. If the attribute is set to No, HTML reserved characters
are converted to their HTML character entities, for example, < is converted to <. The
default value is No.
Note: JSP attributes, in general, are case sensitive.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
formatMask: Contains the Reports format mask to be applied to the fields value. This
attribute is valid for only those fields containing number or date data types.
formatTrigger: Contains the name of a format trigger program unit. The executing
program unit sets the fields attributes in the Reports backend structure, and the tag handler
picks up those attributes and converts them to HTML.
<td
<rw:headers id="HFSALARY" src="HBSALARY"/>
align=right">
<rw:field id="F_SALARY" src="SALARY"
nullValue=" " formatMask="$999,999.00" >
F_SALARY
</rw:field>
</td>
</tr>
</rw:foreach> </tbody>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
What Is a Template?
A template defines common characteristics and objects that you want to apply to multiple
reports. For example, you can define a template that includes the company logo and sets fonts
and colors for selected areas of the report.
Thus far in the course, you have used one of the default templates provided with Reports Builder
for each of your Web reports. You can also create your own Web layout templates. To create a
Web layout template:
1. Create a template file (.tdf file).
2. Create an HTML page that describes the layout.
3. Update the Web Template description file (rwTemplates.xml).
4. Test the new template.
5. Deploy the template in Oracle Reports and Oracle Application Server.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
What Is a Template?
Files required:
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
2. Next, add the tags for the document type and header:
<HTML>
<HEAD>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
<rw:style id=pageStyle">
</rw:style>
4. Use the <TITLE> tag to specify a title for your HTML document. Enter the generic, or
static, content in the <BODY> tag. This content can include the corporate heading and logo.
<title> My Template </title>
<meta content="text/html; charset=iso-8859-1" httpequiv=Content-Type>
<body>
<h1>My Company Report</h1>
<p><IMG src="images/tangfish_logo_color.gif"
width="135 height="36"><br> </p>
5. Now add the <rw:dataArea> tag in the <BODY> tag. This is the placeholder for the
dynamic report data.
<rw:dataArea id="defaultLayout">
<!- Insert your report block here ! -->
</rw:dataArea>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
:P_DEPARTMENT
4. Click OK. Reports Builder displays a message indicating that a bind variable was created.
Click OK to acknowledge the message.
5. Save your report.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Note: You can locate your Web site port number by inspecting the
<oracle_home>\j2ee\DevSuite\config\default-web-site.xml file.
8. When the parameter form appears, select a department from the list. In the Login Id field,
enter the database connection information for your target report. Click the Run Report
button. The employee salary graph for the selected department appears, followed by the
employee detail information.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
Oracle Reports 10g takes advantage of JSP technology to deliver high-quality HTML pages for
Web publishing. In this lesson, you were introduced to JSP technology and learned how to create
Web reports using two options. You learned how to create a Web report using a predefined Web
template and the Report Wizard. You also learned how to add dynamic report content to an
existing Web page.
In the second part of the lesson, you learned how to customize Reports JSPs by modifying the
classes in the style sheet file, using standard HTML tags and attributes, and by using Oracle
Report custom tags. You learned how to create both a template for your Web reports and use it in
the Report Wizard. Finally, you learned how to pass parameters to a Web report by building an
HTML parameter form.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Column
Label
product_id
Product No.
product_name
Name
product_description
Description
catalog_url
Catalog URL
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 3-1
1. Create a tabular report, Web and paper layout, entitled Compensation Report. The report
should contain the following data:
SELECT d.department_name, e.first_name, e.last_name,
e.job_id, e.salary
FROM departments d, employees e
WHERE d.department_id = e.department_id
a. Display all fields. Select the predefined Blue template. Do not make any changes to
the other wizard pages.
b. Run the Web layout to test.
c. Examine the Web source. How many <rw:foreach> tags are in the code? Why this
number?
d. Modify the report using the Report Wizard. Make this a Group Left break report
displaying employing information grouped by department. Include a sum for salary.
e. Examine the Web source again. Now how many <rw:foreach> tags are in the code?
f. Which JSP tag identifies the overall appearance and formatting of the data in the Web
report?
g. Which JSP tag delimits the data model and layout information? Can you view this
information in the Reports Builder?
h. Run the Web layout to test. Save the report as p3q1.jsp.
2. Create a report for the Web that displays current product information.
a. Use the Report Wizard to create a new tabular report called Our Products.
Include the following data from the PRODUCT_INFORMATION table:
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Column
Label
Departments.department_name
Department
Employees.last_name
Last Name
Employees.first_name
First Name
Employees.job_id
Title
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 3-2
1. Customize report p3q3.jsp using JSP tag attributes.
a. Display the salary and summary values with an appropriate currency format.
b. Run the Web layout to test. Save the report as p3_2q1.jsp.
2. Create a Web layout template for your customer, BioDiversity Umbrella, Inc. Include their
company logo, bd_umbrella_logo.gif. Because their corporate colors are red and
gray, you can associate the rwgray cascading style sheet that ships with Oracle Reports
with your template.
a. Create a template definition file, specify the name bd_template, and save the file
in the directory <oracle_home>\reports\templates\.
b. Create an HTML page that defines the static portion of your Web template, as well as
the placeholders for your dynamic report content. Include the company name,
BioDiversity Umbrella, Inc., and the company logo in the HTML page. The code for
the HTML page is provided for you in the p3_2q2.html file. Open this file using a
text editor, such as Notepad, locate the placeholders for the company name and logo,
and make the necessary modifications. Save your HTML file as
bd_template.html in the <oracle_home>\reports\templates\
directory.
c. Register your new template in the Web layout template description file,
rwTemplates.xml. Associate the style sheet rw:gray.css with your new
template. Use the same classSet ID as the Web template rwgray.
d. Copy the BioDiversity logo file to \temp\docroot\images. The docroot
directory is created the first time you test a Web report from Reports Builder.
e. Restart Reports Builder.
3. Test your Web template by creating a new report.
a. Use the Report Wizard to create a group left report, Web layout only. Use Query
Builder to define the SQL query based on the following data. Modify the query so
that you get department information for all employees.
5. Test the parameter form using the embedded OC4J container in Reports Builder.
a. Copy both your parameter form and target Web report to
<oracle_home>\reports\j2ee\reports_ids\web.
b. Open paramform.jsp from this location and modify the action attribute to
execute the target report, p3_2q4.jsp when the user clicks the Run Report button.
c. Start the OC4J instance.
d. Open a browser window and enter the URL for your parameter form:
http://computer_name:port/reports/paramform.jsp?userid=
userid/password@database_name
Hint: You can locate your Web site port number by inspecting the file
<oracle_home>\j2ee\DevSuite\config\default-web-site.xml
When the parameter form displays, select a department from the list and click the
Run Report button.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Overview
Upgrading to Oracle Reports 10g enables you to take advantage of all the new features added to
the product since release 6i. Youve already been introduced to some of these features, such as
the Reports Builder UI enhancements for developing Web reports and graphing functionality
using BI Beans.
In this lesson, you learn more about these and other new features for report development.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Objectives
Accessing Data
To keep pace with todays demand for information, you need to be able to access all available
data. You often need to access data from your corporate internal data sources as well as data
sources outside your corporation. With Oracle Reports, you can publish data from any data
source, and even combine data from one or more of these data sources in a single report.
For example, today e-businesses use XML as a means of data interchange. Imagine a businessto-business scenario where a wholesalers inventory is available to a supplier through XML. The
supplier wants to see what products to ship to his customer, but he can obviously ship only those
products that he has in stock himself. This data is stored in his internal relational database. Using
Oracle Reports, you can create a report merging the XML data and the relational data in real
time and display the results on a Web page. The merge, or join, returns only the items the
wholesaler needs and the supplier has in stock.
In another scenario, you may need to combine data from a relational database with data from a
multidimensional database to compare trends and performance.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Accessing Data
The information you need to publish is often derived from various data sources. These data
sources may be:
SQL-based: relational databases such as Oracle10g
Non-SQL-based: data, such as XML, that has been generated from outside the corporation
Oracle OLAP (Online Analytical Processing ): an integrated part of Oracle Database that
provides support for multidimensional calculations and predictive functions. Oracle OLAP
supports both the Oracle relational tables and multidimensional data types.
Java Database Connectivity (JDBC): other relational data sources such as SQL Server,
Sybase, or another Oracle database
Data in flat files
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
JDBC
OLAP
SQL
Text
files
XML
Your
data
source
Oracle
Reports
Client
Oracle10g
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Out-of-the-Box Options
In addition to traditional data sources such as SQL and PL/SQL, Oracle Reports provides you
with pluggable data sources supporting:
XML data streams, both online and from a file
JDBC connections
OLAP databases
Text files
The design-time API makes it possible to open the appropriate editor to modify your query:
Query Builder is the interface to edit a relational query, whereas a text editor or XML editor is
used to edit an XML data source query.
If the out-of-the-box PDS options available do not suit your needs, you can write your own data
source mechanism using an open Java API. For example, if your business works with a specific
file or data format that you want to make available for reporting, you can create a PDS for this
particular format and incorporate it into Reports Builder to access your own unique data source.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Out-of-the-Box Options
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
The DTD defines the structure of the data in the XML document. Like the XML document, the
DTD can be stored locally or remotely. For this example, the DTD contains this definition:
<!ELEMENT TABLE (*ROW)>
<!ELEMENT ROW (EMPID?, BONUS?, PERINC?)>
<!ELEMENT EMPID (#PCDATA)>
<!ELEMENT BONUS (#PCDATA)>
<!ELEMENT PERINC(#PCDATA)>
It indicates that the XML document contains three data elements: EMPID, BONUS, and
PERINC. The content specification, #PCDATA, specifies that an element contains only parsed
character data, that is, ordinary text.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
XML Report
The output for the report is a simple tabular report.
Note: All the data is of type character. This is because we used a DTD to describe the
XML, and DTDs do not contain data type information. A DTD treats all data as character data.
Therefore, trying to format the BONUS or PERINC columns numerically in the Paper Design
view will have no effect. To overcome this, we could use an XML schema to define our data. An
XML schema is more complex to build but it does contain information about other data types.
Technical Note
For more information on creating reports using other data sources, see Oracle Reports Building
Reports 10g.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
XML Report
Dept 10
West
East
Dept 20
West
East
;
Dept 30
West
East
Dept 40
Dept 80
Copyright 2005, Oracle. All rights reserved.
Report Bursting
The capability of producing multiple copies of a given report or portions of it in different output
formats is referred to as report bursting.
Because you have worked with Oracle6i Reports, you know you can design each section of a
paper reportHeader, Main, and Trailerwith a completely different structure, page layout,
page size, destination, and output format, yet base them on the same data. You can distribute the
sections of a report to different sets of users in different formats. You specify the desired
destination at either the report or section levels. In this way, a single report execution can
produce multiple copies of the output (or portions thereof) in different physical formats, whether
it is to a printer, e-mail, the file system, or the Web.
The report bursting feature has been enhanced to enable bursting on repeating data within a
report. With a single run of your report, you can produce multiple copies or portions of the
output in different physical formats: printer, e-mail, file system, or Web. This ensures that each
user receives only the information that is relevant and appropriate for them. More importantly,
the report is actually run only once, and the output is sent to the different sets of users according
to the requirements. You have the overhead of just a single data fetch and format to distribute the
report. This is called one-pass reporting.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Report Bursting
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Screen reader
Visual
Hearing
Motor
Oracle Reportsgenerated PDF
Cognitive
Value
Alternative Text
Headers
ID
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Property
Value
Report Language
Table Caption
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Result
<i>, <em>
Italic
<u>
Underline
<s>, <strike>
Strikethrough
<span>
Bold
The following table shows the supported properties for the style attribute of the span tag:
Property
font-family
Description
Specifies the font name
font-size
color
Note: One limitation of this feature is that you must specify a tag in its entirety on a single line.
Continuing a tag onto a new line is not supported. For usage notes and other limitations, see the
Advanced Concepts chapter in the manual Oracle Reports Building Reports 10g.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Product_Name
Product_Description
Printer
Digital Camera
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Default style
User-defined style
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Property
Style Sheets
Description
Report-level property that specifies the list of external
style sheets to be applied to your report when generating
HTMLCSS output. You can specify multiple style sheets
separated by commas, a new line, or a tab space.
CSS ID
Note: Both the CSS ID property and the CSS Class Name property apply styles to text objects.
The difference is that CSS ID specifies a style that is defined for a text object that will be
manipulated in the report output by JavaScript or Dynamic HTML (DHTML). If the text objects
in your report output will be used with JavaScript or DHTML, use the CSS ID property to
specify the user-defined style for the text object; otherwise, use the CSS Class Name property.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Graph XML
</rw:graph>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Defines a graph
Attributes
id
src
groups
dataValues
series
width
height
graphHyperlink
<rw:graph
id="graph-id"
src="group-name"
groups="column-list"
dataValues="list"
[series="columnlist"]
[width="size"]
[height="size"]
[graphHyperlink="link"]
tag body
</rw:graph>
rw:graph Tag
The rw:graph tag defines a graph in a Web report. The rw:graph tag requires a data source
and must be enclosed in the rw:report tag. The tag body is required and contains the definition of
the graph in XML.
The attributes that define the rw:graph tag are:
groups: List of data source columns that are used to generate a row-key in the XML
graph definition
dataValues: List of numeric data source columns that provide data for the graph
series: List of data source columns that are used to generate a column-key in the XML
graph definition; optional
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
rw:graph Tag
Use the Web Source editor to modify or add attributes. In the previous slide, the width and
height attributes were included to customize the size of the graph in the Web report. The graph
hyperlink will invoke a drilldown report on a specific employee.
You can also customize a graph by modifying the graph XML.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Technical Note
For more information on graphs and the graph attributes that can be specified in the
Graph.XML file, see the Oracle Reports 10g Frequently Asked Questions on the Oracle
Technology Network:
http://www.oracle.com/technology/products/reports/index.html
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Paper layout
report
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Note: If you use Reports Builder to run a paper layout report that contains graph hyperlinks,
the Paper Design view does not display the hyperlinks. To view the hyperlinks, generate
HTML or PDF report output using File > Generate to File from the menu; the output file
displays the hyperlinks.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Java Importer
As you know, PL/SQL is the procedural language used in Oracle Reports. If the business logic
for your application is written in Java, you may want to integrate it into your report. The Java
Importer enables you to access the rich environment of the Java programming language from
your reports. Using the Java Importer, you can automatically generate PL/SQL packages and
procedures to access Java classes and then program with the generated PL/SQL in your reports.
The PL/SQL generated by the Java Importer is robust, offering support for the original Java class
constructors, methods, and fields.
In addition to mapping static methods to PL/SQL functions and procedures, the Java Importer
provides support for persistent Java objects, with support for type mapping and array objects.
Imported Java runs in the middle tier. The corresponding generated PL/SQL package calls into
the Java class and the Java methods execute in a dedicated Java Virtual Machine (JVM) on the
Reports Server. A dedicated JVM is created for each Reports Server application instance that
uses the generated PL/SQL package to call the imported Java.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Java Importer
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
For an example on how to use the Java Importer, refer to the chapter Building a Report
with a Barcode JavaBean in the Oracle Reports Building Reports manual.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
In this lesson you should have learned about several new features that support report
development.
A pluggable data source, or PDS, is an Oracle Reports feature that enables data input from
numerous sources through the implementation of design-time and run-time Java APIs.
Oracle Reports provides out-of-the-box implementations for the XML, OLAP, Text, and
JDBC data sources.
You can burst your reports on repeating groups. With a single run of your report, you can
produce multiple copies or portions of the output in different physical formats, ensuring
that each user receives only information that is relevant and appropriate for them.
You can add a table of contents to your report by using the Format Order of Sections
property or by using the SRW.SET_FORMAT_ORDER built-in procedure.
Oracle Reports supports Adobe PDF 1.4. Using the PDF taxonomy properties, you can
store metadata about your PDF output. Oracle Reports also provides properties that allow
you to create report output that can be read by assistive technologies.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary (continued)
Oracle Reports 10g provides text formatting enhancements that allow you to use a defined
set of HTML formatting tags to format text style and text attributes and generate formatted
text objects in all bitmap output formats supported by Oracle Reports.
Oracle Reports 10g supports user-defined styles and style sheets for HTMLCSS output.
The Graph Wizard enables you to easily produce graphs for both your paper and Web
reports. You can customize your Web graphs by modifying the attributes of the
rw:graph tag. Similarly, you can customize graphs in your paper layout by modifying
the Graph.xml file.
Oracle Reports is integrated with Oracle JDeveloper, enabling you to leverage the powerful
publishing capabilities of Oracle Reports within your Java applications.
The Java Importer enables you to access the rich environment of the Java programming
language from your reports. Using the Java Importer, you can automatically generate
PL/SQL packages and procedures to access Java classes and then program with the
generated PL/SQL in your reports.
Practice 4: Overview
In this practice session, you create a report using the XML data source and a SQL query. You
burst this report on a repeating group and distribute a separate PDF report for each group. You
open existing reports to add a graph using the Graph Wizard. You reenter the Graph Wizard to
change the characteristics of the graph. You also add and customize a graph in a Web report.
Finally, you create a table of contents for an existing report.
For solutions to this practice, see Appendix A, Practice Solutions.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 4: Overview
Graph Type
Bar
Graph Subtype
Bar
Position
Category
sales_rep_id
Data
total_sales
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 4
1. You work for an international company that has warehouses around the world. The
database at corporate headquarters maintains information about each of the warehouses
(warehouse ID, name, city, country, and so on) in a relational database. However, each
warehouse stores it operational data locally in a relational database. A planning team at
headquarters must access this inventory data for every warehouse. The warehouse data is
only available as an XML stream.
Create a report that combines general data stored in headquarters with the inventory data
from each warehouse location.
a. Create a new report manually.
b. In the Data Model view, create a SQL query. Import the SQL query p4q1.sql.
c. Create an XML Query. For the Data Definition, locate the
warehouse_inventory.xsd file. For the data source, locate the
warehouse_inventory.xml file.
d. Link the two data sources together so that your report will provide a general
description of each warehouse along with the specific inventory for each location.
e. Create both a Web and paper layout for this report. Select the Group Above style.
Ensure that both groups are selected and display all fields. Use the Blue template
for this report.
f. Save the report as p4q1.jsp.
g. Run the Web layout for the report.
2. Continue working with report p4q1.jsp. Modify the report to burst on repeating data,
based on warehouse ID, and distribute a PDF report for each warehouse.
a. In the Object Navigator, select the outermost repeating frame and delete it.
b. Set the property for the main section of the report to burst on each warehouse ID.
c. Define the distribution for the report. Generate a PDF file for each warehouse, using
the warehouse name as a unique identifier for each PDF file, such as
rptBejiing.pdf.
d. Activate the distribution.
e. Save the report as p4q2.jsp.
f. View the output generated for several of the warehouses.
3. Open report p4q3a.jsp.
a. Run the paper layout to become familiar with the report.
b. Rename SumCust_totalPersales_rep_id to Total_Sales (a shorter,
more meaningful name looks better in a chart).
c. Use the Graph Wizard to create a bar chart.
Title
Graph Type
Horizontal Bar
Graph Subtype
Bar
Bar
Graph Subtype
Bar
Category
sales_rep_id
Data
total_sales
Title
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 4 (continued)
d. Run the paper layout to test. Resize the graph in the Paper Layout, if necessary.
e. Save report as p4q3.jsp.
4. Reenter the Graph Wizard to change the characteristics of the graph created in the
previous exercise.
a. Provide the graph with the following characteristics:
Title
Table of Contents
Style
Tabular
Displayed Groups
G_TOPIC (down)
Displayed Fields
TOPIC
Pages
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 4 (continued)
e. Create a tabular report block in the Header section of your report. This report block
will display the headings in your table of contents (in this exercise, the warehouse
name) and the page range where the information can be found in the report.
Specify the following:
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Overview
When you are ready to publish your reports, all the Web server and application server tools you
need are available in Oracle Application Server 10g.
In this lesson, you learn about the architecture of relevant Oracle Application Server components
in combination with its reports publishing component, OracleAS Reports Services. You learn
how to make report requests, about the options available for managing and monitoring Reports
Services, and how OracleAS Single Sign-On ensures that the appropriate users are getting
important data in a secure fashion. You also learn about some of the new features available in
OracleAS Reports Services.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Objectives
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Business
Integration
Intelligence
Broker
Application server
Grid Computing Infrastructure
Management
Portal
Web
Services
Any data
source
Packaged
application
B2B
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Mobile and
Wireless
Enterprise
Portal
System Management
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
HTTP
Oracle HTTP Listener
mod_OC4J
rept.jsp
OID
JSP Engine
CORBA/IIOP
OracleAS
Reports Services
CORBA/IIOP
Reports
Engine
PDS
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
HTTP
Oracle HTTP Listener
mod_OC4J
Reports Servlet
Fax
CORBA/IIOP
OID
int
Pr
Ma
il
CORBA/IIOP
rept.rdf
rept.jsp
Reports
Engine
PDS
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
HTTP URL
RWCLIENT command line
OracleAS Portal
SRW.RUN_REPORT
Web service
Event-Driven Publishing API
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Method
paper layout
layout only
Deploying a Report
After youve created your report, you then must deploy it so that end users can view it. The steps
to deploy a report depend on the type of report.
If the report is one with a paper layout (that is, REP, RDF, or XML, or a JSP with only a
paper layout), follow the steps for deploying a paper report.
For a JSP report with both a paper and Web layout, or a JSP with only a Web layout,
follow the steps for deploying a report to the Web and paper.
In this section, you learn how to deploy a report with a paper layout (a REP, RDF, XML, or JSP
report) and how to deploy a report with a Web layout (that is, a JSP report).
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Deploying a Report
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
OracleAS
OracleAS
Reports
Reports
Services
Services
Destinations
Engines
Notifications
Cache management
Data sources
Output destinations: Oracle Reports offers several features that enable you to deliver the
published data exactly where you need it. Oracle Reports supports the following
destinations: browser, file, e-mail, printer, OracleAS Portal, FTP server, and WebDAV.
These destinations are written against a Java-based API that also allows you to create and
plug in your custom destination. For example, you can use the Java API to create a
destination that sends the report output to the database as a binary large object (BLOB).
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Security
Plug-in interface
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Technical Note
For examples on implementing your own mechanisms, refer to the Oracle Reports SDK
section on Oracle Technology Network (OTN). The Oracle Reports Plugin Exchange on OTN
hosts downloadable, easy-to-install plug-ins that provide additional functionalities to enhance
your reporting infrastructure.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Security
Destinations
Engines
URL Engine
Notifications
Cache management
Data sources
Security
Destinations
Engines
Notifications
Cache Management
Data Sources
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Out-of-the-Box Implementations in
Oracle Reports
ENVID=AR
ENVID=AR
Reports
engine 1
ENVID=ZHT
Reports
Server
ENVID=ZHT
Reports
engine 2
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Set the value of the ENVID command line keyword to the id of the environment element, to
make the environment settings effective for the current report job request. The ENVID
argument identifies the environment setting that you want to use for the current job request.
The Reports Server starts a new engine with the required environment settings to process the
request; the environment settings are effective only for that particular report job request.
Note: The environment settings are also applicable to pluggable engines, which will be spawned by
the Reports Server using the specified environment id.
Example
Suppose that you need to run reports in Japanese from your Reports Server. An environment
conducive to running reports in Japanese would include:
NLS_LANG = Japanese_Japan.JA16SJIS
The currency unit (NLS_CURRENCY) would be set to Yen (), the currency of Japan.
First, add an environment element to your Reports Server configuration file:
<environment id="JP">
<envVariable name="NLS_LANG value="Japanese_Japan.JA16SJIS"/>
<envVariable name="NLS_CURRENCY" value=""/>
</environment>
After the environment element is in place, you can request a report with Japanese output in either
of the following ways:
Use the defaultEnvId attribute of the engine element in the Reports Server
configuration file:
<engine id="rwEng" initEngine="1" minEngine="0" maxEngine="10"
engLife="50" maxIdle="30" defaultEnvId="JP"/>
The value JP identifies the environment element in the Reports Server configuration file. The
initial engines will be spawned with the environment settings specified in this environment
element.
Set the ENVID command line keyword:
http://WebServer:Port/reports/rwservlet?
server=report_server&report=report.rdf&userid=username/pwd@DB
&desformat=HTMLCSS&destype=cache&envid=JP
When you submit the URL, the Reports Server detects the optional ENVID parameter and matches
the specified id (in our example, JP) to the corresponding id of the environment element in its
configuration file. If Reports Server already has an engine running with these characteristics, it will
reuse the existing engine to process the job. If not, the server spawns an engine using the current
environment, plus the two environment variables specified in the JP environment element. After
Reports Server has an engine running with the correct environment, the job is processed by that
engine and the output is routed to the specified DESTYPE.
Note: If you do not specify the optional ENVID parameter with your report request, the Reports
Server processes your request using an engine started with the defaultEnvId environment. If
defaultEnvId is not specified for the engine element in your server configuration file, then the
engine inherits the settings with which you started the Reports Server instance.
On UNIX, the environment is set using the script reports.sh. For more information, see the
chapter Configuring OracleAS Reports Services in the Oracle Application Server Reports
Services Publishing Reports to the Web manual.
Oracle Reports Developer 10g: Move to the Web 5-22
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Printer
DISPLAY
Reports
Server
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
opmn.xml
addNewServerTarget.bat
Targets.xml
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Resource security ensures that only authorized users or groups execute a specific report. It also
keeps users or groups from accessing particular printers or Reports Servers for the execution of
the report. Consider the scenario where certain printers and servers might be reserved for a
particular group of users. Alternatively, some printers and servers may simply be inaccessible
during certain times for maintenance activities.
After it is determined that a user has the necessary privileges to execute a given report through
the specified Reports Server to the specified destination, then the users privileges to the data
source accessed by the report must be ascertained.
Note: OracleAS Portal provides resource security for reports, printers, calendars, and Reports
Servers out of the box. In a typical configuration, the administrator can specify which users and
groups can access which reports, Reports Servers, and printers from OracleAS Portal.
Data Source Security
Data source security defines the users or roles that can access the data within the given data
source. A report might access multiple data sources and the current user must have privileges on
all of the data sources accessed by the report in order to run it and view the output. The database
administrator typically grants access to data sources. Data source security must be established
and in place prior to configuring your reports environment.
OracleAS Single Sign-On
With the increasing number of Web-based, e-business applications that companies deploy for use
by their employees, customers, and partners, many businesses must now consider Single sign-on
functionality. Single sign-on refers to the ability to log in to a single security system once, rather
than logging on separately to multiple security systems. With single sign-on, each user maintains
a single identity and password for all data and associated resources to which they need access.
Within a given Web application, OracleAS Reports Services eases the users experience with
OracleAS Single Sign-On. OracleAS Single Sign-On ensures that each user authenticates only
once.
With OracleAS Single Sign-On, your administrator establishes a user identity for each user. The
administrator does this in the Oracle Internet Directory (OID), through its user interface, the
Oracle Delegated Administration Services. The user identity consists of the username and
password. After users are established, data source connection strings may be associated with
them. At login, users must enter their usernames and passwords (their user identities), which in
turn gives them access to all of the data sources associated with those identities. OracleAS Single
Sign-On issues a session cookie that effectively acts as a key that opens all authorized doorways
for that session.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
http://newton.world.com:7778/reports/rwservlet?
report=emp_dept.rdf&server=repsrv1&destype=cache
&ssoconn=mykey/OracleDB/userid&desformat=html
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Reports Server security is turned on and off in the Reports Server configuration file. By default,
the Reports Server configuration file <servername>.conf is located in
<oracle_home>\reports\conf. The server configuration file contains the following
security element:
<security id="rwSec" class="oracle.reports.server.RWSecurity">
<!--property name="securityUserid"
value="%PORTAL_DB_USERNAME%/%PORTAL_DB_PASSWORD%@%PORTA
L_DB_TNSNAME%" confidential="yes" encrypted="no"/>
<property name="oidEntity" value="%REPORTS_OID_ENTITY%"/>
</security>
This security element is referenced by default from the two default job elements in the
configuration file to indicate that Reports Server security should be enforced:
<job jobType="report" engineId="rwEng" securityId="rwSec"/>
<job jobType="rwurl" engineId="rwURLEng" securityId="rwSec"/>
To disable Reports Server security, you must remove or comment out the security element as
well as the securityId attributes from the job element specifications.
Enabling and Disabling Data Source Security
To enable data source security through OracleAS Single Sign-On, you must:
Include SSOCONN in the URL that launches the report
Populate the Oracle Internet Directory with data source connection information
SSOCONN specifies one or more connect strings to use to connect to one or more data sources in
a single sign-on environment. The syntax for SSOCONN is:
key_name/data_source_type/conn_string_parameter
where,
key_name maps to a string stored in the Oracle Internet Directory that provides the
necessary information to connect to the database
data_source_type is the type of data source to which you are connecting. This value
must be a valid resource type stored in the Oracle Internet Directory. Oracle Reports
provides default resource types for:
- Oracle database (OracleDB)
- JDBC PDS (JDBCPDS)
- Oracle Express PDS (EXPRESSPDS)
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
In this lesson, you learned about:
OracleAS Reports Architecture
OracleAS Reports Services provides a scalable, flexible deployment platform to run your
reports. Features include Web integration, automatic reports engine management, caching and
job persistence, and Oracle Enterprise Manager integration. The JSP architecture of OracleAS
Reports Services enables you to run the Web layout, whereas the servlet architecture enables you
to run the paper layout.
Oracle Reports Plug-in Interface
The Plug-in Interface is a set of Java APIs that allow you to extend the functionality of the
Reports Server by creating the pluggable components for security, destinations, engines,
notifications, cache management, and data sources.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary (continued)
Managing and Monitoring OracleAS Reports Services
The Oracle Process Manager and Notification Server (OPMN) provides a centralized
mechanism for initializing, maintaining, and shutting down your Oracle Application Server
components, including Reports Servers.
Oracle Enterprise Manager is an integrated solution for administering and monitoring all
the components of Oracle Application Server. Using the Oracle Enterprise Manager 10g
Application Server Control you can:
- Start and stop your OracleAS Reports Servers
- Monitor server performance and engine status
- View and edit Reports Server configuration, trace, and log files
- Manage the reports job queues and terminate running, hung, or idle engines
- Monitor engine parameters such as engine name and status
Securing Application and Resource Access with OracleAS Single Sign-On
Oracle Single Sign-On (SSO) functionality helps businesses overcome security risks by enabling
users to log into multiple applications at once with only one username and password. Although
you as the end user must remember only a single username and password, SSO tracks and uses
all the different username and password combinations for each application.
Reports Server Enhancements
The Reports Server is capable of dynamic environment switchingthat is, the ability to serve
reports with any arbitrary environment settings, including language. The DISPLAY and printer
dependencies of the Reports Server on the UNIX platform have been eliminated.
Practice 5: Overview
In this practice session, you deploy and run reports on Oracle Application Server. You monitor
the status of your job and the Reports Server by using Oracle Enterprise Manager. Finally, you
run reports using entries you make in the key map file.
For solutions to this practice, see Appendix A, Practice Solutions.
Note: The first time you run a report on the application server in a new browser session, you will
be prompted to enter your single sign-on username and password. If an error message appears
after you click Login, click the browsers Back button and specify the URL again. The probable
cause for this error message is a timeout.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 5: Overview
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 5
Scenario:
The CEO of your company has asked you to provide her with access to report p3q2.jsp while
she meets with her regional offices. She wants the report to run very quickly and the URL
should be easy for her to remember. In addition, she doesnt want anyone else to be able to run
the report unless she gives permission.
1. Deploy and run report p3q2.jsp on the application server.
2. Validate that the report has been run by checking its status using Oracle Enterprise
Manager. Explore the Enterprise Manager console to view the status of other jobs run by
this server. Ensure that the default engines are set to start up so that your reports execute in
a timely manner.
Note: The suggested guideline is that the value for Maximum Engines should not exceed
four times the number of CPUs. The value of Minimum Engines depends on usage
patterns, and the rule of thumb is to initially set this parameter to 1/2 the value of
Maximum Engines. For this exercise, set Maximum Engines = 2, Minimum Engines = 1,
and Initial engines = 1.
3. Hide the database credentials for the report by using a key map file. Also ensure that your
CEO does not have to provide the Reports Server name when she runs the report.
Note: After the key map file is modified, restart the OC4J instance. As an alternative, edit
the file <oracle_home>/reports/conf/rwservlet.properties and set the
parameter RELOAD_KEYMAP=YES. Restart the OC4J instance this one time.
4. Test the execution of the report using the key map entry.
5. Your customer, BioDiversity Umbrella, Inc., is anxious to deploy the employee report
p3_2q4.jsp with its associated parameter form paramform.jsp. However, the
customer has requested that the database credentials in both the report and parameter form
be hidden from the user.
a. Modify the type attribute of the input field in your parameter form from text to
hidden.
b. Create an entry in the key map file for the parameter form. Include the Reports Server
in the entry. Ensure that the last token in the entry is %*. This token indicates that all
arguments from the URL request, in addition to the arguments in the key map entry,
should be passed to the Reports Server.
c. Deploy the report and the parameter form to the Application Server.
Hint: Also remember to copy supporting files to the application server.
d. Run the parameter form using the key map entry. Select a department from the LOV
and ensure that the report displays data for the selected department.
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Overview
In this lesson, you learn about some of the new deployment features in Oracle Reports.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Objectives
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
E-mail Enhancements
You are the report developer for a manufacturing company, and need to deliver monthly
information to all the companys warehouses. To do this, you burst your report based on each
warehouse ID, then create separate PDF reports for each warehouse, and finally create a
distribution XML file to e-mail each section as an attachment to individual warehouses.
For the complete example, including sample files, see the Bursting and Distributing a Report
example in Getting Started with Oracle Reports, which is on OTN at the following location:
(http://www.oracle.com/technology/products/reports/htdocs/
getstart/GettingStarted/index.html).
Technical Note
The SMTP mail server is specified during the installation process. If you did not specify a server
during installation, you can provide the name of the mail server manually before distributing
your report to an e-mail destination. You can specify the outgoing mail server using
pluginParam in the server config file, as in the following example:
<pluginParam name="mailServer">smtp01.mycorp.com</pluginParam>
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
GIF
PNG
BMP
TIFF
CGM
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Syntax:
OUTPUTIMAGEFORMAT={PNG|JPEG|JPG|GIF|BMP}
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
DESFORMAT
=
SPREADSHEET
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Spreadsheet output is not paginated; rather, it is formatted as a single page. Therefore, the
output does not contain page setup information such as margin, orientation, header, and
footer.
The report output appears in a single worksheet inside MS Excel. You cannot define the
output to appear in different worksheets, nor can you specify the worksheet name.
Summary and formula columns are shown as values, and not as dynamic Excel formulas.
In addition, the page-level summary columns are reduced to report-level summary
columns, because there is no page concept in Excel.
Graphs embedded in spreadsheet output are static image files, and not native, interactive
Excel graphs.
You cannot generate a character-mode report to spreadsheet output.
Bursting and distribution are not supported in spreadsheet output. You cannot specify a
SPREADSHEET output format in a distribution.xml file or in the Distribution
dialog box.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
http://myhost:80/reports/rwservlet?report=products.rdf&
server=repsvr1&userid=oe/oe@ORCL&destype=file&
desformat=spreadsheet&desname=products.xls
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
PDFCOMP
Syntax: PDFCOMP=value|{YES|NO}
Value: between 0 and 9
YES: Sets compression to level 6, the default
NO: Sets compression to level 0
value is a number from 0 through 9. A value of 0 indicates that the PDF output will not
be compressed. A value of 1 through 9 indicates that the PDF output will be compressed.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Font aliasing
Font subsetting
Font embedding
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Embedding Fonts
PDF font embedding is the process of including the entire font set along with the data in the PDF
file. Font embedding increases the size of your output PDF files.
You can use PDF font embedding in Oracle Reports only for Type1 (PostScript) fonts. To include
specific TrueType fonts in your report, convert them to Type1 fonts using available third-party
tools. To embed a Type1 font in your PDF output, specify the font name and the font file names in
the [PDF:Embed] section of uifont.ali.
Use the PDFEMBED command line option to specify whether Oracle Reports will embed the
Type1 font files specified in the uifont.ali file into PDF output. The syntax is:
PDFEMBED={YES|NO}
YES: The PDF driver will embed the fonts specified in the [PDF:Embed] header of the
uifont.ali file into the PDF output.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Embedding Fonts
Subsetting Fonts
With font subsetting, the PDF file includes the font information required to render the PDF,
regardless of the availability of that font on the machine that you use to view the report. You can
use PDF font subsetting for both single byte, multibyte, and Unicode fonts, and it is the preferred
method of creating multibyte reports.
Note: PDF font subsetting and font embedding are mutually exclusive.
Font subsetting enables you to create reports that are:
Clear: The rendition of the PDF output is highly readable.
Accessible: Your reports can be read by a screen reader.
Searchable: You can search the content of the report for a specific word. You can also
extract information from the PDF file by using the copy command.
When you subset a font in a PDF file, it becomes a custom font because it contains only those
characters that are needed for the report output.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Subsetting Fonts
Technical Note
If you have entries for the same font in more than one PDF section, the precedence order is as
follows:
Font aliasing takes precedence over font embedding. (Highest)
Font subsetting takes over font embedding. (Intermediate)
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Running a report
Displaying report status
Canceling a report
Managing parameter lists
Event-Based Reporting
Today, it is often desirable to blend automation into business processes through the invocation of
behind-the-scenes procedures and functions. These behind-the-scenes tasks can include the
spontaneous production of output such as an invoice that prints automatically when an order is
processed, a Web site that is automatically updated with fresh data, or an automatic e-mail
alerting an employees manager that the employee has submitted an expense report for approval.
Consider this last scenario. When an employee submits an expense report, new data is inserted
into the database. When this database event occurs, you want to alert the employees manager
through an e-mail or a notification in his portal page that a submittal is awaiting his approval.
With the Oracle Reports event-driven publishing API, this is possible.
The event-driven publishing API is a PL/SQL package that allows jobs to be automatically
submitted to OracleAS Reports Services in response to events that occur within the database.
The procedures are called from a database trigger to run a report when an event occurs. The
trigger invokes the Reports Server and the job is submitted to the server.
In addition to database events, the API can be integrated with Advanced Queuing (AQ) and
Oracle Workflow.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Event-Based Reporting
The SRW Package contains all relevant procedures and functions for submitting, checking
the status, and canceling jobs, as well as manipulating parameter lists.
The ParamList Type defines a parameter list. A parameter list is the main vehicle for
passing values when submitting a job and is required for each job submittal.
The ParamList Object is required for such features as Advanced Queuing, where a
parameter list must be stored in the database so that it can be passed along with a message.
The event-driven publishing API is automatically installed with OracleAS Reports Services
Security and OracleAS Portal. However, if you want to install the API into a database that does
not contain OracleAS Portal, you can use the srwAPIins.sql installation script. You then
run the srwAPIgrant.sql script to grant access privileges to the installed API.
Technical Note
Advanced Queuing is the message queuing functionality of the Oracle database. Oracle
Workflow is a tool that manages complex user-based business processes. For more information,
refer to the Oracle Technology Network at http://www.oracle.com/technology/index.html.
See the OracleAS Reports Services Publishing Reports to the Web manual for more information
about event-driven publishing.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
GATEWAY
SERVER
REPORT
USERID
SRW.RUN_REPORT(SRW
_PARAMLIST object)
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
myIdent SRW.Job_Ident;
BEGIN
IF (:new.ExpStat = 'DONE') THEN
myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));
srw.add_parameter(myPlist,'GATEWAY','http://');
srw.add_parameter(myPlist,'SERVER','repSVR');
srw.add_parameter(myPlist,'REPORT','alert.RDF');
srw.add_parameter(myPlist,'USERID','scott/tiger');
srw.add_parameter(myPlist,'ExpenseID',:new.ExpID);
myIdent := srw.run_report(myPlist);
END IF;
END;
This trigger fires after each insert or update on the EXP_REP table. When the status of an
expense report changes to DONE, the parameter list is constructed and a report is invoked. The
parameter list, myPlist, contains the necessary parameters for submitting the job from a
browser to the Reports Servlet:
GATEWAY provides the URL to the Reports Servlet that will be used to process the request.
SERVER identifies the name of the Reports Server to be used in conjunction with the
servlet.
AUTHID provides authorization information if you are running the job on a secured server.
The API method RUN_REPORT takes the parameter list containing all vital information as input,
creates and submits the request, and returns a variable of type SRW.JOB_IDENT. This is the
job identification record that holds the information required to identify the job uniquely. You can
also use the information in the record to check the status of the job.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Wireless destination
http://Myserver.com:7778/reports/rwservlet?report=myreport.rdf
&destype=oracleWireless&desname=1-650-345-4567&...
Wireless notification
http://myserver.com:7778/reports/rwservlet?report=myR
eport.rdf&callonsuccess=voice:1-555-555-1234&...
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
As a portlet
As an item
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Note: The page group must already exist in OracleAS Portal. If the page already exists, Oracle
Reports then adds the report output as a new item. If the specified page does not exist, Oracle
Reports creates the page before sending the report output to the page.
To use oraclePortal as your destination, you must configure this destination type in your
Reports Server configuration file.
Using WebDAV
Another way to send your report output to OracleAS Portal is by specifying WEBDAV as your
report destination type. Web-based Distributed Authoring and Versioning (WebDAV) is a set of
extensions to the HTTP protocol that enables collaborative creation, editing, and searching of
documents from remote locations. OracleAS Portal supports the use of WebDAV.
For example:
http://myAppServer.com:80/reports/rwservlet?report=emp.rdf
&server=repsrv1&userid=hr/hr@ORCL&desformat=htmlcss
&destype=WEBDAV&desname=http://portaluser:password
@webDAVServer.com:7778/dav_portal/portal/HRpagegroup/HR_Home
/emp.html
rwrun report=emp.rdf userid=hr/hr@ORCL desformat=htmlcss
destype=WEBDAV desname=http://portaluser:password
@webDAVserv.com:7778/dav_portal/portal/HRpagegroup/HR_Home
/emp.html
Both the URL and the command line example will run the report emp.rdf and send the
output to a page named HR Home in the HRpagegroup page group on OracleAS Portal
WebDAV.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
User
Group
User
Group
DAS interface
OracleAS Portal
Copyright 2005, Oracle. All rights reserved.
RW_BASIC_USER
RW_POWER_USER
RW_DEVELOPER
RW_ADMINISTRATOR
You must assign appropriate privileges to these groups to enable group members to perform any
desired functions on reports through OracleAS Portal. For example, if you want the members of
the RW_BASIC_USER group to run a particular report, you must grant the Execute privilege to
that group by using the Access tab of that report object.
Oracle Reports Developer 10g: Move to the Web 6-25
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
To learn more about the creation of new users and groups in OracleAS Portal, refer to the Oracle
Application Server Portal Configuration Guide.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Field
Description
Name
Display Name
Portal DB Provider
Printers
Availability Calendar
When you click Finish, the resulting page summarizes your settings for this Reports Server. On
this page, you can edit your settings, get detailed registration information about the Reports
Server, or delete it altogether.
After you have registered your Reports Server, you can register a report.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
8. Select the Publish as Portlet check box. This adds the report to the Portlet Repository,
allowing you to add it to a page and publish your report as a portlet.
9. Click Apply.
Registering a Printer
You are not required to register a printer within the security framework of OracleAS Portal. You
can run a report on any printer as long as it is available to the Reports Server. However, you may
want to confine OracleAS Portal users to a subset of those printers, constrain the use of a printer
for certain periods of time, or identify a particular printer to be used for printing output of certain
reports. Printer registration with OracleAS Portal is meaningful for reports that you run through
OracleAS Portal, as well as those you run through a stand-alone URL.
Creating an Availability Calendar
Defining availability calendars is an optional step that enables you to further restrict access to
reports, servers, and printers by specifying when they can and cannot be accessed. Availability
calendars are not necessary if the reports, the Reports Servers, and printers are always available
for processing.
For more information on registering a printer and creating an availability calendar, refer to the
Deploying Reports to OracleAS Portal chapter of Oracle Application Server Reports Services
Publishing Reports to the Web 10g.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
1
2
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
In this lesson, you should have learned about some of the new features of Oracle Reports for
deployment:
Oracle Reports provides enhancements for e-mail distribution.
The OUTPUTIMAGEFORMAT parameter enables you to explicitly specify the format for
images in your report output.
You can generate MS Excel output from existing paper layout reports saved in any format
using the DESFORMAT=SPREADSHEET command line keyword.
You can take advantage of PDF enhancements when deploying your reports: compression,
font subsetting, and font embedding.
The event-driven publishing API is a PL/SQL package that allows jobs to be automatically
submitted to OracleAS Reports Services in response to events that occur within the
database, such as an expense entry that require managers approval.
The Oracle Reports integration with OracleAS Wireless enables you to send your reports
output to a fax machine, and to send notifications about your job execution status to WAPenabled devices, e-mail, fax, and voice mail.
Oracle Reports is integrated with OracleAS Portal. You can send Oracle Reports output to
OracleAS Portal by using the WebDAV or the oraclePortal destinations. You can
deploy your reports through the declarative, secure interface of OracleAS Portal.
Oracle Reports Developer 10g: Move to the Web 6-36
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Summary
Practice 6: Overview
In this practice, you generate spreadsheet output for one of your reports. You publish a report to
a portal page by specifying OracleAS Portal as the report destination. Finally, you register
Reports components with OracleAS Portal and publish reports as items and portlets.
For solutions to this practice, see Appendix A, Practice Solutions.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 6: Overview
Open a browser window and specify the URL for OracleAS Portal:
http://AppServer:port/pls/portal.
Log in using your single sign-on username and password. The Portal Builder
Welcome page appears.
Click the Build tab.
In the Page Groups portlet, click the Create Page Group link.
Specify a name and display name for your page group. For example:
Name: MyPageGroup_your initials
Display Name: MyPageGroup_your initials
Click Create. Your new page group is displayed in edit mode. Click the Home link to
return to the Build tab. Your new page group should now appear in the list of page
groups in the Page Group portlet.
a. Copy your report to the deployment directory on the application server machine.
b. Execute your report on the application server, specifying OracleAS Portal as the
destination for the report output. Publish the report, in PDF format, in your page
groupon page MyPage_your initialsand specify an item title of
Dept_Salaries. Name the status page Results.
Hint: Open a new browser window so you can toggle between OracleAS Portal and
Oracle Reports.
c. View your report output in OracleAS Portal.
d. View the Results page.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 6
1. Your manager needs a listing of all the products the company sells. He has requested the
output in a spreadsheet format so that he can analyze the information while he is traveling.
Generate the requested output using report p3q2.jsp.
2. Publish the output of report p3q1.jsp in PDF format to your personal page group on
OracleAS Portal. This report lists employee salary information for each department.
Note: Recall that the page group must already exist in OracleAS Portal. To create a page
Group:
Field
Name
Description
My_Reports_Server_xx
Display Name
My Reports Server xx
Portal DB Provider
EXAMPLE_APP
http://AppServer:port/reports
/rwservlet
If you terminated your Portal session after completing the previous exercise, log in again to
OracleAS Portal using your single sign-on username and password.
4. Register report p3q1.jsp with OracleAS Portal.
a. Specify the following details in the wizard, leaving the other fields set with their
default values:
Field
Name
Value
Sales_Report_xx
Display Name
Sales Report xx
Portal DB Provider
EXAMPLE_APP
Reports Server
My Reports Server xx
via servlet
Destination Type
Cache
Destination Format
HTML
Optional Parameters:
Name
Display Name
userid
userid
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 6 (continued)
3. You will be deploying selected reports as items and portlets using OracleAS Portal. In
preparation, register your Reports Server with OracleAS Portal. This server should only run
registered report definition files. Specify the following details in the wizard, leaving the
other fields set with their default values:
c. Using the Access tab, ensure that your report can be published as a portlet.
5. Publish report Sales Report xx as an Oracle Reports item on your portal page.
a. Navigate to the Build tab of Portal Builder.
b. Select your page group from the drop-down list in the Page Groups portlet and view
the page group. Display the portal page on which you want to publish your report.
c. Edit the page and add an item to display your report. Configure the page to include
the Oracle Reports item type. Specify a display name of your choice and ensure that
the report will display in a new browser window.
d. View your portal page and run your report.
6. Publish the same report as a portlet.
a. Edit your portal page and add a portlet region. To add a new region to your page,
click the Add Region Right icon in the region banner just below the display name of
your portal page. This adds a new region to the right of the existing one. You will add
your portlet here.
b. Add a portlet to the new region. Locate your report in the Portlet Repository.
Hint: The portlet is under Portlet Staging Area > Example Application.
c. View your portal page.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 6 (continued)
b. The Manage portlet for the Reports component appears after you finish the wizard.
Customize the Reports component and specify the database connection information
needed to run your report. Save the parameter values and close the window.
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice Solutions
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
Name
Value
Group number
Lab directory
Source
Obtain from instructor
(values 1 19)
In a standard setup:
e:\labs
Database connect
ora___/oracle@_______ Obtain from instructor
string
<oracle_home> for
In standard setup is:
Oracle Developer Suite
e:\oracle\ds10g
10g
Right-click My Computer,
Developer Suite host
select Properties, click
name
Network ID tab
<oracle_home> for
In a standard setup:
Oracle Application
e:\oracle\as10g
Server 10g
Database host name
Database SID
Application Server
host name
HTTP_port
In a standard setup: 80
Oracle Enterprise
Manager port
In a standard setup:
18100
Oracle Enterprise
Manager username
In a standard setup:
ias_admin
Oracle Enterprise
Manager password
<oracle_home> for
Oracle Application
Server 10g
Oracle Single Sign-On
username
Oracle Single Sign-On
password
OracleAS Portal
username
OracleAS Portal
password
In a standard setup:
welcome1
In a standard setup:
e:\oracle\10gas
In a standard setup:
orcladmin
In a standard setup:
welcome1
In a standard setup:
orcladmin
In a standard setup:
welcome1
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 1: Overview
This practice session helps you become familiar with the Oracle software development strategy
for Oracle Reports.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 1: Solutions
1. Become familiar with Oracles software development strategy for Oracle Reports by
reviewing the document Oracle Forms Oracle Reports Oracle Designer Statement of
Direction. You can access this document on the Reports home page of the Oracle
Technology Network (http://www.oracle.com/technology/products/reports/index.html).
Open a browser window.
Introduction
Your company has recently upgraded from Oracle6i Reports to Oracle Reports 10g. In this
practice session, you migrate a report to the new release, replacing deprecated and obsolete
functionality with the new functionality.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 2: Overview
This practice session covers:
Identifying potential problem areas in a report due to deprecated and obsolete features
Replacing SRW.SET_ATTR functions in a format trigger
Save the report as migrated.rdf. Generate the output to a PDF file using Reports
Builder. View the PDF output in your browser, testing the new functionality.
a. Open the report deprecated.rdf. Run the paper layout to become familiar with
the report. Be sure to scroll to the bottom of the report. Which aspects of the report do
you need to investigate?
Open deprecated.rdf in Reports Builder. Run the paper layout by clicking
the Run Paper Layout icon or by selecting Program > Run Paper Layout from
the menu.
Investigate the report output. There is a format mask applied to specific values
in the Phone Number column. There is a text item displaying Show Local Phone
Book in the margin area at the bottom of each page. You need to further
investigate these aspects of the report.
b. Examine the format trigger on the Phone Number field. Replace the deprecated
SRW.SET_ATTR functions with the new built-in procedures so that the report output
looks the same. Use the Reports Builder online Help to identify the built-in
procedures. Save your report as migrated.rdf. Run the paper layout to test your
changes.
In the Object Navigator, user the Search field to locate F_PHONE_NUMBER.
Display the Property Inspector for the field by selecting Property Inspector from
the right-mouse shortcut menu or by selecting Tools > Property Inspector from
the main menu.
Display the value for the Format Trigger property. The PL/SQL Editor displays
the code for the format trigger.
Replace the SRW.SET_ATTR functions in the trigger code with the following:
srw.set_border_width ('1');
srw.set_foreground_border_color ('red');
srw.set_background_border_color ('blue');
srw.set_border_pattern ('solid');
srw.set_foreground_fill_color ('yellow');
srw.set_background_fill_color ('green');
srw.set_fill_pattern ('solid');
Click Compile. Ensure that the code successfully compiles. Close the PL/SQL
Editor window.
Save the report as migrated.rdf. Run the paper layout to test your changes.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 2: Solutions
1. Your company has recently upgraded to Oracle Reports 10g. Your team is migrating
reports developed with release 6i to release 10g. Your manager has asked you to migrate
the corporate directory report. Identify potential problems in the report due to deprecated
and obsolete functionality. To ensure a smooth migration to release 10g, replace the
deprecated and obsolete functionality using the new functionality.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
In Part 2 of this practice session, you customize a Web report using JSP tag attributes. You
create a template for Web reports and test it by creating a new Web report. Finally, you create an
HTML parameter for that report to restrict the data returned to the user.
.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 3: Overview
Part 1 of this practice session covers:
Creating reports for the Web using the Report Wizard
Examining the Web source code
Modifying a Web report using the Report Wizard
Adding dynamic content to an existing Web page
Part 2 of this practice session covers:
Customizing a Web report using JSP tag attributes
Creating a Web layout template and using it to create a Web report
Creating an HTML parameter form
Introduction
In Part 1 of this practice session, you create simple reports for the Web using the Report Wizard.
You examine the Web source code to identify specific JSP tags. You also create a Web report by
adding dynamic content to an existing Web page.
a. Display all fields. Select the predefined Blue template. Do not make any changes to
the other wizard pages.
Create a new report using the Report Wizard. Create both a Web and paper
layout. Select Tabular as the style and enter Compensation Report as the title.
Select SQL as the data source and enter the query text from above. Select all
fields for display. Do not create any totals. Select the Blue template and finish the
wizard.
b. Run the Web layout to test.
Select Program > Run Web Layout from the menu or select the Run Web
Layout icon from the horizontal tool bar.
c. Examine the Web source. How many <rw:foreach> tags are in the code? Why this
number?
Display the Web Source view of the Report Editor by one of the following
methods:
- Double-click the Web Source object icon in the Object Navigator.
- Click the Web Source button in the Report Editor toolbar.
Use Edit > Find and Replace to locate the rw:foreach tags. There is one tag in
this Web source code because there is one group in the data model.
d. Modify the report using the Report Wizard. Make this a Group Left break report
displaying employing information grouped by department. Include a sum for salary.
Reenter the wizard. Select Group Left as the style. On the Groups page, select
DEPARTMENT_NAME from the Available Fields list and copy into the Group
Fields list. On the Totals page, select SALARY and click Sum >. Finish the
wizard.
e. Examine the Web source again. Now how many <rw:foreach> tags are in the code?
Display the Web Source view of the Report Editor. Use Edit > Find and Replace
to locate the rw:foreach tag(s). There are two rw:foreach tags, one for
each group in the Data Modelone for the master group, one for the detail
group.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
g. Which JSP tag delimits the data model and layout information? Can you view this
information in the Reports Builder?
The rw:objects tag delimits the data model and the layout information for a
Reports JSP. Reports Builder displays the <rw:objects > tags but hides the
data model and layout information. To see this, use a text editor such as
Notepad.
h. Run the Web layout to test. Save the report as p3q1.jsp.
2. Create a report for the Web that displays current product information.
a. Use the Report Wizard to create a new tabular report called Our Products.
Include the following data from the PRODUCT_INFORMATION table:
Column
Label
product_id
Product No.
product_name
Name
product_description
Description
catalog_url
Catalog URL
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
d. Create a report block and add it to the Reports JSP. The Web source code has a place
holder for your report block. Choose the Group Left style and include a title Salaries
by Department. Include all groups and display them in the down direction.
Display all fields. Use a label of Name for DEPARTMENT_NAME and Title for
JOB_ID. Select the predefined Beige template.
Display the Web Source view of the Report Editor by clicking the Web Source
button in the horizontal tool bar or by double-clicking the Web Source node in
the Object Navigator.
Scroll through the code until you locate the placeholder <!-- Insert your
report block here -->.
With your cursor in that position, select Insert > Report Block from the menu.
Select the style Group Left and enter Salaries by Department in the title field.
Select the group G_department_id and click Down >.
Select the group G_Employee and click Down >.
Copy all the columns from the Available Fields area to the Displayed Fields area.
On the labels page, make the appropriate changes.
Select the Beige template. Click Finish.
e. Run the Web layout to test. Save the report.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
a. Display the salary and summary values with an appropriate currency format.
Display the Web Source view of the Report Editor. Locate the rw:field tag for
F_SALARY and add the formatMask attribute:
<rw:field id="F_salary" src="salary"
nullValue=" " formatMask="$999,999.00">.
Locate the rw:field tag for F_SumsalaryPerdepartment_id and add the
same format mask attribute:
<rw:field id="F_SumsalaryPerdepartment_id...
"formatMask="$999,999.00">
Locate the rw:field tag for F_SumsalaryPerReport and apply the same
formatMask attribute.
b. Run the Web layout to test. Save the report as p3_2q1.jsp.
2. Create a Web layout template for your customer, BioDiversity Umbrella, Inc. Include their
company logo, bd_umbrella_logo.gif. Because their corporate colors are red and
gray, you can associate the rwgray cascading style sheet that ships with Oracle Reports
with your template.
a. Create a template definition file, specify the name bd_template, and save the file
in the directory <oracle_home>/reports/templates/.
In Reports Builder, select File > New > Template from the menu. The paper
layout for the new template displays. Do not make any changes to the paper
layout.
Invoke the Property Inspector for the template and specify a name of
bd_template.
Save the bd_template.tdf in the directory <oracle_home>/
reports/templates/.
b. Create an HTML page that defines the static portion of your Web template, as well as
the placeholders for your dynamic report content. Include the company name,
BioDiversity Umbrella, Inc., and the company logo in the HTML page. The code for
the HTML page is provided for you in the p3_2q2.html file. Open this file using a
text editor, such as Notepad, locate the placeholders for the company name and logo,
and make the necessary modifications. Save your HTML file as
bd_template.html in the <oracle_home>/reports/templates/
directory.
Locate the file p3_2q2.html in your \Lab directory and open it using a text
editor such as Notepad.
Locate the placeholder for the company title and replace it with
BioDiversity Umbrella, Inc.
Locate the placeholder for the company logo and replace it with
bd_umbrella_logo.gif.
Save your changes as bd_template.html in the directory
<oracle_home>/reports/templates/.
Oracle Reports Developer 10g: Move to the Web A-12
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Label
Departments.department_name
Department
Employees.last_name
Last Name
Employees.first_name
First Name
Employees.job_id
Title
Create a new report using the Report Wizard. Create a Web layout only. Select
Group Left as the report style.
On the Data Source definition page of the wizard, click Query Builder.
In the Select Data Tables dialog box, highlight the DEPARTMENTS and
EMPLOYEES tables, click Include, and close the dialog box.
In the Query Builder window, select the columns from the tables and click OK.
Modify the resulting query and remove the join condition that restricts the data
to only managers and their departments. Click Next.
Select Department_Name as the group field. Click Next.
Display all fields in the report and modify the labels as suggested above.
On the Template page of the wizard, click the Template file option and select
bd_template.tdf from <oracle_home>/reports/templates.
Click Finish.
b. Save your report as p3_2q3.jsp.
c. Run the Web layout to test your template.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
c. Modify the Web source of your parameter form to populate the LOV with data
retrieved from your data model. The code to do this is provided for you in the
p3_2q4c.txt file. Save your changes. Run the Web layout for the parameter form
to test.
Display the Web Source view of your parameter form by clicking the Web
Source button in the Report Editor or by double-clicking the Web Source icon in
the Object Navigator.
Locate the code that returns a static value for the LOV. Hint: Look for the
<select> tag. Replace this code with the code in the file p3_2q4c.txt.
Save your changes.
Click the Run Web Layout button to test. The parameter form appears in
your browser, and the LOV is populated with an alphabetized list of
departments.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
5. Test the parameter form using the embedded OC4J container in Reports Builder.
a. Copy both your parameter form and target Web report to
<oracle_home>/reports/j2ee/reports_ids/web.
Using Windows Explorer, copy paramform.jsp and p3_2q4.jsp to
<oracle_home>/reports/j2ee/reports_ids/web.
b. Open paramform.jsp from this location and modify the action attribute to
execute the target report, p3_2q4.jsp when the user clicks the Run Report button.
In Reports Builder, open paramform.jsp from the location
<oracle_home>/reports/j2ee/reports_ids/web.
Display the Web Source for the JSP.
Locate the action attribute. Modify the code to point to your report:
action=p3_2q4.jsp
Save your changes.
c. Start the OC4J instance.
From the Start menu, choose Programs > Oracle Developer Suite <oracle_home > Reports Developer > Start OC4J Instance.
d. Open a browser window and enter the URL for your parameter form:
http://computer_name:port/reports/paramform.jsp?userid=
userid/password@database_name
Hint: You can locate your Web site port number by inspecting the file
<oracle_home>\j2ee\DevSuite\config\default-web-site.xml
When the parameter form displays, select a department from the list and click the
Run Report button.
No formal solution.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 4
This practice session covers:
Creating a report using a pluggable data source
Bursting your report on a repeating group and distributing the sections to multiple
destinations
Adding charts to paper and Web reports
Generating a table of contents for a report
Introduction
In this practice session, you create a report using the XML data source and a SQL query. You
burst this report on a repeating group and distribute a separate PDF report for each group. You
open existing reports to add a graph using the Graph Wizard. You reenter the Graph Wizard to
change the characteristics of the graph. You also add and customize a graph in a Web report.
Finally, you create a table of contents for an existing report.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 4: Solutions
1. You work for an international company that has warehouses around the world. The
database at corporate headquarters maintains information about each of the warehouses
(warehouse ID, name, city, country, and so on) in a relational database. However, each
warehouse stores it operational data locally in a relational database. A planning team at
headquarters must access this inventory data for every warehouse. The warehouse data is
only available as an XML stream.
Create a report that combines general data stored in headquarters with the inventory data
from each warehouse location.
a. Create a new report manually.
Select File > New > Report or select the Report node in the Object Navigator and
click the Create icon. Select the Build a new report manually option.
b. In the Data Model view, create a SQL query. Import the SQL query p4q1.sql.
b. Set the property for the main section of the report to burst on each warehouse ID.
Select the Main Section node in the Object Navigator. Double-click the object
icon to display the Property Inspector or select Tools > Property Inspector from
the menu.
Locate the Repeat On property and select G_WAREHOUSE_ID from the dropdown list.
c. Define the distribution for the report. Generate a PDF file for each warehouse, using
the warehouse name as a unique identifier for each PDF file, such as
rptBejiing.pdf.
Select the Distribution property for the Main section. In the Distribution Dialog
box set the Distribution ID, DESNAME, and DESFORMAT fields. Specify a
unique identifier for the Distribution ID, such as inventory_rpt. Use
warehouse_name in the DESNAME field, for example:
e:\labs\solns\rpt&<warehouse_name>.pdf. Make sure the output
format is PDF.
d. Activate the distribution.
Select File > Distribute from the menu.
e. Save the report as p4q2.jsp.
f. View the output generated for several of the warehouses.
Locate the files in your file system (for example, rptBeiging.pdf and
rptBombay.pdf) and double-click several of them to look at the output.
3. Open report p4q3a.jsp.
a. Run the paper layout to become familiar with the report.
b. Rename SumCust_totalPersales_rep_id to Total_Sales (a shorter,
more meaningful name looks better in a chart).
Display the Data Model and open the Property Inspector for
SumCust_totalPersales_rep_id to change the name. Alternatively,
change the summary field name in the Object Navigator > Data Model > Groups
node.
c. Use the Graph Wizard to create a bar chart.
Display the Paper Layout view. Select Insert > Graph from the menu or select
the Graph tool from the tool palette, click and drag inside the layout. Enter the
following properties on the pages in the Graph Wizard:
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Graph Type
Bar
Graph Subtype
Bar
Position
Category
sales_rep_id
Data
total_sales
In the layout page of the Graph Wizard, drag sales_rep_id from the Groups
section to the Bars section.
d. Run the paper layout to test. Resize the graph in the Paper Layout, if necessary.
e. Save report as p4q3.jsp.
4. Reenter the Graph Wizard to change the characteristics of the graph created in the previous
exercise.
In the Paper Layout view, make sure that the graph is selected; otherwise you will
create a new graph.
Select Graph Wizard from the right-mouse menu.
a. Provide the graph with the following characteristics:
Title
Graph Type
Horizontal Bar
Graph Subtype
Bar
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Graph Type
Bar
Graph Subtype
Bar
Category
sales_rep_id
Data
total_sales
Title
On the layout page of the Graph Wizard, be sure to drag sales_rep_id from the
Groups field to the Bars field.
e. Run the Web layout to test. Save the report as p4q5.jsp.
6. Open report p4q6.rdf. This is a large paper report that lists warehouse inventory. Run the
paper layout to become familiar with the report. Create a table of contents (TOC) for the
report so that you can easily locate the information for any given warehouse.
a. Create a table in the database to hold the TOC information.
Hint: You need two columns: Topic and Page_Number.
Open a SQL*Plus session by using the shortcut on your desktop or by selecting
Start > Programs > Developer Suite > Application Development > SQL Plus.
The SQL statement to create the table is provided for you in the file
p4q6a.sql. Copy the code and paste it in the SQL*Plus window. Press Enter.
Once the table is created, exit the SQL*Plus session.
b. Create an After Parameter Form trigger to modify the default order of the report
execution, so that the Main section is formatted first.
In the Object Navigator, under your report node, expand the Report Triggers
node.
Right-click the AFTER PARAMETER FORM node and select PL/SQL Editor
from the right-mouse menu.
Enter the following code:
FUNCTION AfterPForm RETURN BOOLEAN IS
BEGIN
SRW.SET_FORMAT_ORDER(SRW.MAIN_SECTION,
SRW.HEADER_SECTION, SRW.TRAILER_SECTION);
RETURN (TRUE);
END;
Click Compile. Verify that the status bar of the Program Unit window displays
Successfully Compiled. Close the window.
Oracle Reports Developer 10g: Move to the Web A-20
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
In the Data Model view, select the SQL Query tool and create a new query. Click
Import SQL Query and select the file p4q6d1.sql. Click OK.
In the Data Model view, select the Formula Column tool in the tool palette and
click in the group G_TOPIC of the new query.
With the formula column selected, select Tools > Property Inspector from the
menu. Set the Name property to Pages and Datatype property to Character.
Under Placeholder/Formula, click the PL/SQL Formula property field to display
the PL/SQL Editor. Replace the template code with the code in the file
p4q6d2.sql.
Click the Compile button and verify that the code is successfully compiled. Close
the Program Unit window.
Save your report.
e. Create a tabular report block in the Header section of your report. This report block
will display the headings in your table of contents (in this exercise, the warehouse
name) and the page range where the information can be found in the report.
Specify the following:
Title
Table of Contents
Style
Tabular
Displayed Groups
G_TOPIC (down)
Displayed Fields
TOPIC
Pages
Display the Paper Layout view and click the Header Section button in the
toolbar.
Select the Report Block tool in the tool palette and draw an area about 5 inches
wide and 2 inches high. When you release the mouse button, the Report Block
Wizard appears. Complete the steps in the wizard.
Oracle Reports Developer 10g: Move to the Web A-21
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 5
This practice session covers:
Deploying and running a report on the application server
Validating report status using Oracle Enterprise Manager
Running reports using a key map file
Introduction
In this practice session, you deploy and run a report on Oracle Application Server. You
monitor the status of your job and the Reports Server by using Oracle Enterprise Manager.
Finally, you run reports using entries you make in the key map file.
d. Use Oracle Enterprise Manager to determine the name of your default Reports
Server. Open a browser window and enter the URL for your application server:
http://AppServer.com. The Oracle Application Server 10g Welcome page
appears. In the Oracle Application Server Logins portlet, click the link to log in
to Oracle Enterprise Manager 10g Application Server Control.
Log in using the administrator user name and password:
ias_admin/welcome1.
Click the link for your application server instance.
In the Systems Component list, locate and note the name of the default Reports
Server.
e. Run the report. Open a new browser window. Enter a URL of the format:
http://AppServer:port/reports/p3q2.jsp?
userid=username/password@database_name/server=server_name
2. Validate that the report has been run by checking its status using Oracle Enterprise
Manager. Explore the Enterprise Manager console to view the status of other jobs run by
this server. Ensure that the default engines are set to start up so that your reports execute in
a timely manner.
Note: The suggested guideline is that the value for Maximum Engines should not exceed
four times the number of CPUs. The value of Minimum Engines depends on usage
patterns, and the rule of thumb is to initially set this parameter to 1/2 the value of
Maximum Engines. For this exercise, set Maximum Engines = 2, Minimum Engines = 1,
and Initial engines = 1.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 5: Solutions
Scenario:
The CEO of your company has asked you to provide her with access to report p3q2.jsp while she
meets with her regional offices. She wants the report to run very quickly and the URL should be
easy for her to remember. In addition, she doesnt want anyone else to be able to run the report
unless she gives them permission.
1. Deploy and run report p3q2.jsp on the application server.
a. Examine report p3q2.jsp in Reports Builder to determine what type of report
it is so that you know which method of deployment you need to use. This report
is a JSP with both paper and Web layouts.
b. Deploy the report using the existing Oracle Reports J2EE application. Copy
p3q2.jsp to the application server:
<oracle_home>/J2ee/OC4J_BI_Forms/applications/reports/web
c. Using a text editor, view the file <oracle_home>/J2ee/OC4J_BI_Forms
/config/default-web-site.xml to determine the port number for
deploying Reports applications.
Click the link for Failed Jobs. Look at the status for the failed jobs.
Use the Back button in your browser to return to the Home page for the Reports
Server.
Click the Engines link to display the Engines page. Click the Engine Parameters
button to view the configuration of reports engines. Select rwEng from the drop-down
list.
In the Report Engine Parameters section of the page, set the following parameters:
initEngine = 1
minEngine = 1
maxEngine = 2
Click OK. When prompted to restart the Reports Server, click Yes.
Click OK when the server has restarted to return to the Home page.
Click the Engines link to display the Engines page. Click the Engine Parameters
button. Note that your changes are in effect.
3. Hide the database credentials for the report by using a key map file. Also ensure that your
CEO does not have to provide the Reports Server name when she runs the report.
Note: After the key map file is modified, restart the OC4J instance. As an alternative, edit
the file <oracle_home>/reports/conf/rwservlet.properties and set the
parameter RELOAD_KEYMAP=YES. Restart the OC4J instance this one time.
Locate the key map file cgicmd.dat on the application server machine. The file is
located in the directory <oracle_home>/reports/conf. Open the file using a
text editor. Add a new entry at the bottom of the file, using the following format:
key_name: userid=username/password@connect_string
server=server_name
Save the file.
In Enterprise Manager, display the Home page for the application server. Click
OC4J_BI_Forms. Click Restart.
Alternative: Using a text editor, open <oracle_home>/reports/conf/
rwservlet.properties and set the parameter RELOAD_KEYMAP=YES. Save the
file. Restart OC4J as indicated above this one time.
4. Test the execution of the report using the key map entry.
In your browser window, enter the URL for the report, using the CMDKEY keyword,
for example:
http://AppServer:port/reports/p3q2.jsp?cmdkey=prodreport
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
c. Deploy the report and the parameter form to the application server.
Hint: Also remember to copy supporting files to the application server.
Copy p3_2q4.jsp and paramform.jsp to the application server:
<oracle_home>/J2ee/OC4J_BI_Forms/applications/
reports/web.
Copy bd_umbrella_logo.gif to
<oracle_home>/J2ee/OC4J_BI_Forms/applications/
reports/web/images.
d. Run the parameter form using the key map entry. Select a department from the LOV
and ensure that the report displays data for the selected department.
In your browser window, enter the URL for the parameter form, using the
CMDKEY keyword, for example:
http://AppServer:port/reports/paramform.jsp?
cmdkey=param
Ensure that the user name / password field does not display.
Select a department from the LOV and click Run Report.
Oracle Reports Developer 10g: Move to the Web A-26
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 6
This practice session covers:
Sending report output to MS Excel
Publishing a report to your portal page using OracleAS Portal as the destination.
Publishing reports as items and portlets using OracleAS Portal
&userid=oraxx/oracle@ORCL&server=repsvr&destype=file
&desformat=spreadsheet&desname=<path>/products.xls
Note: If you do not specify the full path location for the output file, for example
e:/labs/lab/products.xsl, the spreadsheet output is stored in the
<oracle_home>/j2ee/home location.
Oracle Reports displays that your report has been successfully run. Click OK.
Open the .xls file using MS Excel and compare the Excel output to Reports Builder
output. Are there any layout objects missing? Is the template preserved?
2. Publish the output of report p3q1.jsp in PDF format to your personal page group on
OracleAS Portal. This report lists employee salary information for each department.
Note: Recall that the page group must already exist in OracleAS Portal. To create a page
group:
Open a browser window and specify the URL for OracleAS Portal:
http://AppServer:port/pls/portal.
Log in using your Single Sign-On username and password. The Portal Builder
Welcome page appears.
Click the Build tab.
In the Page Groups portlet, click the Create Page Group link.
Specify a name and display name for your page group. For example:
Name: MyPageGroup_your initials
Display Name: MyPageGroup_your initials
Click Create. Your new page group is displayed in edit mode. Click the Home link to
return to the Build tab. Your new page group should now appear in the list of page
groups in the Page Group portlet.
a. Copy your report to the deployment directory on the application server machine.
Using Windows Explorer, locate report p3q1.jsp. Using the right mouse menu,
select Copy.
On the application server machine, paste the file in the location
<oracle_home>/j2ee/OC4J_BI_Forms/applications/reports
/web
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 6: Solutions
1. Your manager needs a listing of all the products the company sells. He has requested the
output in a spreadsheet format so that he can analyze the information while he is traveling.
Generate the requested output using report p3q2.jsp.
Open a browser window and specify a URL in the format:
http://AppServer:port/reports/rwservlet?report=p3q2.jsp
Hint: Open a new browser window so you can toggle between OracleAS Portal and
Oracle Reports.
Open a browser window and enter a URL in this format:
http://AppServer:port/reports/rwservlet?
report=p3q1.jsp&userid=oraxx/oracle@ORCL&server=repsrv
&destype=oraclePortal&desformat=PDF
&pagegroup=MyPageGroup_my initials
&outputpage=MyPage_my initials&itemtitle=Dept_Salaries
&statuspage=Results
If prompted, enter you single sign-on user name and password. Click Login.
After your report successfully executes, click OK to acknowledge the message.
c. View your report output in OracleAS Portal.
View the browser window displaying OracleAS Portal.
On the Build tab, select your page group from the drop-down list in the Page
Groups Portlet. Click View.
Click the link for the name of output page you specified in the URL, for example,
MyPage_your initials.
Click the Dept_Salaries link. The report output appears in your browser.
d. View the Results page.
Use the browsers Back button to return to your portal page.
Click the Results link to view the status of your job.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Field
Name
Description
My_Reports_Server_xx
Display Name
My Reports Server xx
Portal DB Provider
EXAMPLE_APP
http://AppServer:port/reports
/rwservlet
If you terminated your Portal session after completing the previous exercise, log in again to
OracleAS Portal using your single sign-on username and password.
a. On the Portal Builder home page, click the Administer tab.
b. In the Oracle Reports Security portlet, click the Oracle Reports Security
Settings link.
c. In the Reports Server Access portlet, click the Create Reports Server Access
link.
d. On the first page of the wizard, specify a Reports Server name and display name,
and the Portal DB provider as indicated in the table above. Click Next.
e. Specify the Reports Server name and the Web Gateway URLs. Select the Run
only Registered Report Definition Files option . Click Next.
f. Click Finish. Click Close.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
a. Specify the following details in the wizard, leaving the other fields set with their
default values:
Field
Name
Value
Sales_Report_xx
Display Name
Sales Report xx
Portal DB Provider
EXAMPLE_APP
Reports Server
My Reports Server xx
via servlet
Destination Type
Cache
Destination Format
HTML
Optional Parameters:
Name
Display Name
userid
userid
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Click the Edit link. Add a new region to the right of the existing region by
clicking the Add Region Right icon in the region banner.
b. Add a portlet to the new region. Locate your report in the Portlet Repository.
Hint: The portlet is under Portlet Staging Area > Example Application.
Click the Add Portlet icon in the new region. The Portlet Repository appears.
In the Available Portlets pane, click Portlet Staging Area. Click Example
Application. Click the link for your Sales Report xx. It is added to the Selected
Portlets pane. Click OK.
c. View your portal page.
Your page returns in edit mode. Click the View Page link in the upper-right
portion of the page.
The portlet displays the output of report p3q1.jsp every time the page is
displayed.
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED