Vous êtes sur la page 1sur 284

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY.

COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Student Guide

D17366GC10

Edition 1.0

November 2005

D22487

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Oracle Reports Developer 10g:


Move to the Web

Copyright 2005, Oracle. All rights reserved.

Ellen Gravina

Disclaimer

Technical Contributors
and Reviewers

This document contains proprietary information and is protected by copyright and


other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered in
any way. Except where your use constitutes "fair use" under copyright law, you may
not use, share, download, upload, copy, print, display, perform, reproduce, publish,
license, post, transmit, or distribute this document in whole or in part without the
express authorization of Oracle.

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

Oracle, JD Edwards, and PeopleSoft are registered trademarks of Oracle Corporation


and/or its affiliates. Other names may be trademarks of their respective owners.

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

Why Move Reports Applications to the Web?


Objectives 1-2
Why Move to the Web? 1-3
Reducing Costs 1-5
Improving Productivity 1-6
Increasing Availability 1-7
Maintaining Support 1-8
Publishing Enterprise Data 1-9
Leveraging a Standards-Based Architecture 1-10
Utilizing New Features 1-12
Oracle 10g Products 1-14
Leveraging Oracle Application Server 10g for Reports 1-15
Oracle Application Server 10g Components 1-17
OracleAS Reports Services 1-18
Oracle Developer Suite 10g 1-19
Summary 1-22
Practice 1: Overview 1-23

Migrating Reports ApplicationsObjectives


Objectives 2-2
Deprecated and Obsolete Functionality 2-3
Migrating Reports Applications 2-5
Reports Builder User Interface Changes 2-6
Formatting with the SRW Built-in Package 2-7
Replacing OLE2 Objects 2-9
Migrating Charts 2-10
Replacing Buttons 2-12
Referencing System Parameters 2-13
Replacing User Exits 2-15
Reports Executables 2-17
Replacing Command Line Keyword Functionality 2-19
Summary 2-21
Practice 2: Overview 2-22

Developing Reports for the Web


Objectives 3-2
Web Publishing 3-3
Paper Publishing 3-4
High-Quality Web Publishing 3-5
What Is JSP Technology? 3-7
iii

Oracle University and DATACTIVA Consultoria y Servicios 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

Using New Features in Oracle Reports: Development


Objectives 4-2
Accessing Data 4-3
Pluggable Data Sources 4-5
Out-of-the-Box Options 4-6
Using XML as a Data Source 4-7
Example: XML Data Stream 4-9
XML Report 4-11

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

JSP Advantages 3-8


Simple HTML: Example 3-10
Simple JSP: Example 3-11
Building a Web Report 3-12
Using the Report Wizard 3-13
Report Editor: Web Source View 3-14
JSP Tags 3-16
Web Source: Example 3-18
Generating Output 3-20
Adding Dynamic Content 3-21
Creating a Report Block 3-23
Invoking the Report Block Wizard 3-25
Examining the Web Source Code 3-27
rw:foreach Tag 3-29
rw:field Tag 3-30
Practice 3-1: Overview 3-31
Customizing Oracle Reports JSPs 3-32
Customizing Oracle Reports JSPs Using Style Sheets 3-33
Customizing Oracle Reports JSPs Using HTML Tags and Attributes 3-35
Customizing Reports JSPs Using Reports Custom Tags 3-36
Customizing Reports JSPs Using Oracle Custom Tags 3-39
What Is a Template? 3-40
Creating a Web Layout Template 3-41
Creating a Template Definition File 3-42
Creating the HTML Page 3-43
Updating the Web Layout Template Description File 3-45
Testing the Web Layout Template 3-47
Passing Parameters to a Web Report 3-48
Creating the Parameter Form 3-50
Modifying the HTML Parameter Form in Reports Builder 3-52
Setting Up the Target Report 3-54
Testing the Parameter Form 3-55
Summary 3-57
Practice 3-2: Overview 3-58

Deploying Reports Using OracleAS Reports Services


Objectives 5-2
Running Reports Using OracleAS Reports Services 5-3
Oracle Application Server Components 5-5
Running the Web Layout: JSP Run-Time Architecture 5-7
Running the Paper Layout: Servlet Run-Time Architecture 5-8
Report Request Methods 5-9
Deploying a Report 5-11
Deploying a Report with a Paper Layout 5-12
Running a Paper Report 5-13
Deploying a Report with a Web Layout 5-14
Running a Web Report 5-15
Using a Key Map File 5-16
Extending Oracle Reports Functionality Using Plug-ins 5-18
Out-of-the-Box Implementations in Oracle Reports 5-20
Dynamic Environment Switching 5-21
Removing the DISPLAY and Printer Dependencies on UNIX 5-23
Configuring Reports Servers 5-24
Managing and Monitoring OracleAS Reports Services 5-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

Report Bursting 4-12


Bursting on a Repeating Group 4-13
Adding a Table of Contents to a Report 4-15
Another Option for Creating a Table of Contents 4-16
Using PDF in Oracle Reports 4-18
Setting PDF Document Taxonomy Properties 4-20
Making PDF Documents Accessible to the Disabled Community 4-21
Inline Formatting Using HTML Tags 4-23
Specifying Inline HTML Tags 4-25
Using External Style Sheets 4-26
Embedding a Graph in a Report 4-28
Adding a Graph to the Web Layout 4-29
Selecting the Graph Type and Data 4-30
Adding Options to the Graph 4-31
Customizing Web Graphs 4-33
rw:graph Tag 4-34
Customizing Graphs Using the Graph.xml File 4-36
Using Graph Hyperlinks 4-38
Creating a Reports JSP in JDeveloper 4-40
Running a Reports JSP in Jdeveloper 4-41
Java Importer 4-42
Importing a Java Class 4-43
Summary 4-45
Practice 4: Overview 4-47

Using New Features in Oracle Reports: Deployment


Objectives 6-2
E-mail Enhancements 6-3
Image Format Support 6-5
Using the OUTPUTIMAGEFORMAT Parameter 6-7
Generating Spreadsheet Output 6-8
Generating MS Excel Output 6-10
Compressing PDF Output 6-11
Enhanced PDF Output 6-12
Embedding Fonts 6-14
Subsetting Fonts 6-15
Event-Based Reporting 6-17
Invoking a Report from a Database Event 6-19
OracleAS Wireless Integration 6-21
Integrating Oracle Reports with OracleAS Portal 6-22
Deploying Reports with OracleAS Portal 6-24
Creating Reports Users and Groups 6-25
Registering Oracle Reports Components 6-27
Registering a Reports Server in OracleAS Portal 6-28
Registering a Report in OracleAS Portal 6-30
Publishing a Report as a Portlet 6-32
Adding a Report as an Item on a Page 6-34
Running an Oracle Reports Item 6-35
Summary 6-36
Practice 6: Overview 6-37

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

Securing OracleAS Reports Services 5-27


Configuring Single Sign-On for Oracle Reports 5-29
Handling Report Requests with OracleAS Single Sign-On 5-31
Summary 5-33
Practice 5: Overview 5-35

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Copyright 2005, Oracle. All rights reserved.

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Introduction

After completing this lesson, you should be able to do


the following:
Describe how this course fits in the Oracle
Reports curriculum
Identify the course objectives
Identify the course content and structure

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web I-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

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

Copyright 2005, Oracle. All rights reserved.

Oracle Reports Curriculum


This course provides a way for you, an experienced Reports 6i application developer, to upgrade
your skills and enable you to migrate your existing applications to the Web, take advantage of
the Web environment and technologies, and enhance applications with new product features.
To complement the Oracle Reports 10g instructor-led offerings, the Oracle by Example (OBE)
series provides hands-on, step-by-step instructions showing you how to implement various
technology solutions to business problems. OBEs are available free of charge from the Oracle
Technology Network (http://www.oracle.com/technology/obe/oberpt904/index.html).

Oracle Reports Developer 10g: Move to the Web I-3

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Curriculum Map

After completing this course, you should be able to do


the following:
List the benefits of deploying Reports applications
to the Web with Oracle Application Server 10g
Migrate Reports 6i applications to Web
deployment with Oracle Application Sever 10g
Use Web technologies to develop Reports
applications
Utilize new product features for Reports

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web I-4

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

Oracle Reports Developer 10g: Move to the Web I-5

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

Oracle Reports Developer 10g: Move to the Web I-6

Oracle University and DATACTIVA Consultoria y Servicios 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

In this lesson, you should have learned how to:


Describe how this course fits in the Oracle
Reports curriculum
Identify the course objectives
Identify the course content and structure

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web I-7

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Why Move Reports Applications


to the Web?

After completing this lesson, you should be able to do


the following:
List the benefits of migrating reports to the Web
Explain the advantages of deploying Oracle
Reports applications by using Oracle Application
Server 10g
Describe the components and functions of Oracle
Application Server 10g

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 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

Objectives

Developing and deploying reports applications on the


Web can benefit your enterprise by:
Reducing costs
Improving productivity
Increasing availability
Maintaining product support
Publishing any data in any format to any
destination
Leveraging a standards-based architecture
Utilizing new features

Copyright 2005, Oracle. All rights reserved.

Why Move to the Web?


Reporting is the delivery of information to information consumers. These consumers must often
further investigate that information. Historically, different tools performed different tasks.
However, there was a growing need to integrate data consolidation, data analysis, and enterprise
reporting tools to provide a seamless environment that allowed users to move from the role of
information consumer to information investigator.
The combination of providing information and enabling additional investigation of that
information is referred to as business intelligence (BI). In an increasingly competitive world,
enterprises are constantly in need of BI that empowers the decision makers in an organization to
act on the information and thus impart that extra competitive edge to the organizations products
and services. Oracles BI solution provides users with the capability to easily integrate diverse
data sources, convert this data into information, share this information with authorized users, and
exploit the information to learn more about the business and its customers.
Oracle Reports is the enterprise reporting component of Oracles BI offering.

Oracle Reports Developer 10g: Move to the Web 1-3

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Why Move to the Web?

Utilizing new features


This lesson provides you with a closer look at these benefits.

Oracle Reports Developer 10g: Move to the Web 1-4

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Why Move to the Web? (continued)


Enterprise reporting grew out of a business need for better, faster, and more flexible delivery of
individually tailored information to a very large number of users. No environment is better suited
to fulfill this need than the Internet.
Through Web reporting, companies can provide critical information to a large and
geographically distributed user base in a timely manner. By moving your client/server report
applications to the Web, your organization benefits by:
Reducing costs
Improving productivity
Increasing accessibility
Maintaining product support
Publishing any data in any format to any destination
Leveraging a standards-based architecture

Multiple products and vendors

Integrated product set

Multiple PCs

Centrally managed server

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 1-5

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 1-6

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 1-7

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 1-8

Oracle University and DATACTIVA Consultoria y Servicios 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

Publish from any source, in any format, to any


destination with high fidelity.

JDBC
OLAP
XML
TEXT
<your data source>

Copyright 2005, Oracle. All rights reserved.

Publishing Enterprise Data


In a modern IT environment, data is produced in different places and in different formats. For
example, in a manufacturing organization, each geographically distributed warehouse may store
inventory data in a relational database, whereas the headquarters of the organization may prefer
to store basic data, such as the average inventory per warehouse, in XML format. You must
collect data from these different sources and present it as consolidated information.
Oracle Reports enables you to publish data from any source in any format with high fidelity.
It supports SQL, PL/SQL (ref-cursor), XML, JDBC, Oracle OLAP, and text files (both delimited
and fixed format). You can combine queries from different data sources in a single report and
link them to produce master-detail relationships. In addition, you can use Java-based APIs to
create access mechanisms for data common to your business and integrate them into Oracle
Reports, enabling you to use this data directly in your report.
Oracle Reports gives you flexibility in the presentation of your data. You can create highfidelity paper-oriented reports suitable for printing, as well as create true Web reports in which
the data is part of a Web page that is designed for your corporate Web site.
You can publish your data to any destination, including a browser, file, e-mail, printer, OracleAS
Portal, FTP server, and Web-based Distributed Authoring and Versioning (WebDAV).

Oracle Reports Developer 10g: Move to the Web 1-9

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Publishing Enterprise Data

JSPs
XML

Servlets

J2EE

PL/SQL APIs

CORBA

Java APIs

IIOP

Copyright 2005, Oracle. All rights reserved.

Leveraging a Standards-Based Architecture


Utilizing a Standards-Based, Modular Architecture
Oracle Reports uses an open, standards-based, modular architecture.
Oracle Reports uses a reporting paradigm of a JavaServer Pages (JSP)based Web source,
which enables you to address all the needs of dynamic Web publishing. Based on the
industry-standard JSP 1.2 technology, it allows you to inject dynamic report content into
any surrounding structure. Using custom JSP tags, you can add programmatic elements in
existing Web pages.
Servlets are Java programs that run as part of a network service, such as a Web server, and
respond to requests from clients. Servlets extend the functionality of a Web server by
delivering dynamic content.
Java 2 Platform, Enterprise Edition (J2EE) is a specification that defines the standard for
developing component-based multitier enterprise applications for the Web. The J2EE
platform provides many features, such as write once, run anywhere portability, JDBC
APIs for database access, CORBA technology for interaction with existing enterprise
resources, and a security model that protects data even in Internet applications. In addition,
it provides full support for Enterprise JavaBeans (EJB) components, Java Servlets API,
JavaServer Pages, and XML technology.
Oracle Reports Developer 10g: Move to the Web 1-10

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 1-11

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


Utilizing a Standards-Based, Modular Architecture (continued)
Common Object Request Broker Architecture (CORBA) is an industry-standard
specification for application interoperability defined by the Object Management Group
(OMG). In a distributed computing network using the CORBA architecture, heterogeneous
systems can communicate with one another independent of platform, operating system,
programming language, network, and protocol. The Reports Server is implemented as a
CORBA object; clients, such as rwservlet and rwclient, communicate with the server
through CORBA calls.
Internet Inter-ORB Protocol (IIOP) is an industry-standard protocol developed by OMG to
implement CORBA solutions over the Web. IIOP enables browsers and servers to
exchange integers, arrays, and more complex objects, unlike HTTP, which supports only
transmission of text.
The Oracle Reports Java APIs help you to define your own plug-ins for data sources,
output destinations, security infrastructure, cache management, engines, and so on.
The OracleAS Reports Services Event-Driven Publishing API is a PL/SQL package that
enables you to run a report based on the occurrence of an event in the database.
Oracle Reports provides extensive support for Extensible Markup Language (XML). You
can specify customizations to reports with an XML file, use XML as a data source,
describe an entire report definition in XML, and deliver output in XML format.

Design time
enhancements
Integration

Data source

Paper layout

JSP Web
source

Developers

Copyright 2005, Oracle. All rights reserved.

Utilizing New Features


There are many new features in Oracle Reports that were not available in Oracle Reports
6i. These include:
Design-time features, such as:
- The ability to add dynamic report content to Web pages
- A built-in JSP engine for previewing Web reports
- Instant preview for paper and Web layouts
Design-time integration with:
- Java Importer for generating wrapper PL/SQL packages for Java classes
- Oracle JDeveloper for developing and debugging Reports JSPs
- Oracle Software Configuration Manager (SCM) for source control
A variety of new data sources, as well as an open, Java-based API for defining your own
pluggable data source
Paper layout enhancements
A JSP-based Web source that shares the data model with paper layouts
Java-based graphs

Oracle Reports Developer 10g: Move to the Web 1-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

Utilizing New Features

Distribution

Server

APIs

Security

Developers

Copyright 2005, Oracle. All rights reserved.

Utilizing New Features (continued)

An expanded list of destinations for report distribution, including SMTP-based e-mail,


OracleAS Portal, FTP, and WebDAV, as well as an open, Java-based API for defining your
own destination
Server infrastructure enhancements, such as:
- A Java server available in stand-alone and in-process modes
- Java APIs that enables you to extend built-in capabilities for data sources, engines,
notifications, report destinations, security models, and cache management algorithms
- Ability to access OracleAS Reports Services by using a Web service
- Oracle Workflow integration
- Centralized management with Oracle Enterprise Manager (OEM) Application Server
Control
PL/SQL Event-Driven Publishing API
Security enhancements, such as single sign-on for application, resource, and data source
authentication
Note: This lesson provides only an overview of the new features. These will be covered in more
detail later in the course.

Oracle Reports Developer 10g: Move to the Web 1-13

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Utilizing New Features

Reports
Services

Reports
Developer

Copyright 2005, Oracle. All rights reserved.

Oracle 10g Products


Oracle10g provides the complete Internet infrastructure that makes it easy for companies
interested in e-commerce to create and deploy scalable, Web-based applications. Oracle markets
the following three products to help you achieve this:
Oracle Database 10g: Manages all of your information, both structured (such as operational
data from your applications) and unstructured (such as documents, XML, and images). Oracle
tools, such as Oracle Reports, can automatically reuse the database structure and its integrity
constraints, which reduces the amount of manual coding.
Oracle Application Server 10g: Runs all of your applications, including Java, wireless, portals,
and business intelligence. Using Oracle Application Server, you deploy and manage all
applications developed with Oracle Developer Suite 10g. The Oracle Application Server
contains Oracle Reports Services, which you use to deploy your reports applications.
Oracle Developer Suite 10g: Enables you to quickly and easily build scalable, secure, and
reliable e-business applications. Oracle Developer Suite 10g provides a complete and highly
productive development environment for building applications. Oracle Reports Developer 10g is
a component of Oracle Developer Suite 10g.

Oracle Reports Developer 10g: Move to the Web 1-14

Oracle University and DATACTIVA Consultoria y Servicios 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 10g Products

Copyright 2005, Oracle. All rights reserved.

Leveraging Oracle Application Server 10g Architecture


Oracle Application Server 10g provides all the middleware services you need to deploy and
manage Oracle Reports applications. Its layered architecture includes:
Communication Services: These services handle incoming requests received by Oracle
Application Server 10g. Some of these requests are processed by the Oracle HTTP Server
and some requests are routed to other areas of Oracle Application Server 10g for
processing.
Application Runtime Services: A J2EE container provides a common run-time
environment for applications developed as JSPs, servlets, Enterprise JavaBeans (EJB), and
Web Services.
System Services: Oracle Application Server 10g includes a common set of run-time
services that are necessary for J2EE applications and Web services, such as request
dispatch and scheduling, resource management, resource pooling, clustering, fault
monitoring, transaction management, and messaging.

Oracle Reports Developer 10g: Move to the Web 1-15

Oracle University and DATACTIVA Consultoria y Servicios 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 Oracle Application Server 10g


for Reports

Oracle Reports Developer 10g: Move to the Web 1-16

Oracle University and DATACTIVA Consultoria y Servicios 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 Oracle Application Server 10g Architecture (continued)


Management Services: These services provide a comprehensive management framework
for your entire Oracle environment and network security. These services monitor the status,
performance, and faults of the system (as well as resource consumption and usage), manage
a single instance or cluster of instances, centrally administer security for users and
applications, and provide a comprehensive directory service framework to manage users.
Connectivity Services: These services provide connectivity to a variety of systems.
Solutions: This comprehensive set of solutions is built on the infrastructure described
above and includes enterprise portals, enterprise integration, business intelligence, wireless,
and Internet service provider (ISP) solutions.

Copyright 2005, Oracle. All rights reserved.

Oracle Application Server 10g Components


With the components of Oracle Application Server 10g, you can:
Develop and deploy all of your dynamic Web sites and applications (J2EE and Internet
Applications)
Create personalized portals to access all of your content and applications (Portal)
Enable wireless access to portals (Wireless)
Cache data and pages to accelerate the performance of any Web site (Caching)
Extract business intelligence from site and application usage, and use it to personalize
applications (Business Intelligence)
Integrate users, applications, and businesses (E-Business Integration)
Manage and secure your entire Web infrastructure (Management and Security)

Oracle Reports Developer 10g: Move to the Web 1-17

Oracle University and DATACTIVA Consultoria y Servicios 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 Application Server 10g


Components

A component of Oracle
Application Server that
deploys Reports
applications in Web and
non-Web environments

Oracle Application Server


Reports Services

Copyright 2005, Oracle. All rights reserved.

OracleAS Reports Services


OracleAS Reports Services is the reports publishing component of Oracle Application Server. It
is an enterprise reporting service for producing high-quality production reports that dynamically
retrieve, format, and distribute any data, in any format, anywhere. You can use OracleAS
Reports Services to publish in both Web-based and non-Web-based environments.
In the Web environment, the OracleAS Reports Services architecture can consist of four tiers:
The client tier that contains the Web browser
The Web server tier
The OracleAS Reports Services tier
The data tier (databases and pluggable data sources)
Note: When referring to a multitier architecture, the term tier refers to the logical location of the
components that the OracleAS Reports Services architecture comprises. In a typical deployment
environment, the Web server tier and the OracleAS Reports Services tier are often deployed on
the same machine.
You learn about the components of Reports Services later in the course.

Oracle Reports Developer 10g: Move to the Web 1-18

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Services

Application Development

Copyright 2005, Oracle. All rights reserved.

Oracle Developer Suite 10g


The Oracle Developer Suite offers a complete set of integrated development tools, enabling you
to easily and quickly create Internet applications for personalized Web portals and hosted
software services. Oracle Developer Suite 10g combines leading Oracle application development
and business intelligence tools into a single integrated product. Built on Internet standards such
as Java and XML, Oracle Developer Suite provides a complete development environment.
The components of Oracle Developer Suite 10g include Oracle Designer, Oracle Forms
Developer, Oracle JDeveloper, Oracle Software Configuration Manager, Oracle Discoverer,
Oracle Reports Developer, Oracle Warehouse Builder, and Oracle Business Intelligence Beans.

Oracle Reports Developer 10g: Move to the Web 1-19

Oracle University and DATACTIVA Consultoria y Servicios 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 Developer Suite 10g

Oracle Forms is Oracles long-established technology to design and build enterprise


applications quickly and efficiently. Oracles commitment to this technology enables you
to leverage your existing investment by easily upgrading and integrating existing Oracle
Forms applications to take advantage of Web technologies and service-oriented
architectures (SOA). Oracle JDeveloper is an integrated development environment with
end-to-end support for modeling, developing, debugging, optimizing, and deploying Java
applications and Web services. Oracle JDeveloper 10g introduces a new approach to J2EE
development with features that enable visual and declarative development. The innovative
Oracle Application Development Framework simplifies J2EE development. Oracle
JDevelopers productivity with choice offers a choice of development approach,
technology scope, and deployment platform.
J2EE and Web services: Oracle Developer Suite supports the latest J2EE application
programming interfaces (APIs), including Enterprise Java Beans (EJB), JavaServer Pages
(JSP), and servlets. Web services support Simple Object Access Protocol (SOAP), Web
Service Definition Language (WSDL), and Universal Description, Discovery, and
Integration (UDDI).
Team support: Oracle Software Configuration Management provides versioning,
dependency management, and impact analysis for all objects and file types.

Oracle Reports Developer 10g: Move to the Web 1-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

Oracle Developer Suite 10g (continued)


For application development, Oracle Developer Suite 10g provides capabilities in:
Modeling: Oracle Designer 10g delivers dramatic increases in productivity for database
application developers. Oracle Designer provides a complete toolset to model, design,
generate, and capture the enterprise application requirements.
Rapid application development (RAD): RAD capabilities in Oracle Developer Suite
feature integrated builders, reentrant wizards, live previewers, and property inspectors.

Business Intelligence

Copyright 2005, Oracle. All rights reserved.

Oracle Developer Suite 10g (continued)


For business intelligence, Oracle Developer Suite provides the capabilities for:
Extract, transform, and load: Oracle Warehouse Builder provides an easy to use,
graphical environment for rapidly designing, deploying, and managing business
intelligence systems. It also provides an extensible framework for integrating a diverse set
of data sources with BI tools.
End-user query and analysis: With Oracle Discoverer, you can create, modify, and
execute ad hoc queries and reports. More casual users can view and navigate through
predefined reports and graphs. Discoverer provides a business view to hide the complexity
of the underlying data structure. It enables you to focus on solving business problems and
brings insight to your data.
Enterprise reporting: Oracle Reports Developer enables you to access any data, publish it
in any format, and send it to any destination.

Oracle Reports Developer 10g: Move to the Web 1-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 Developer Suite 10g

In this lesson, you should have learned how to:


List the benefits of migrating reports to the Web
Explain the advantages of deploying Oracle
Reports applications by using Oracle Application
Server 10g
Describe the components and functions of Oracle
Application Server 10g

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 1-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

Summary

This practice helps you become familiar with the


Oracle software-development strategy for Oracle
Reports.

Copyright 2005, Oracle. All rights reserved.

Practice 1: Overview
For solutions to this practice, see Appendix A, Practice Solutions.

Oracle Reports Developer 10g: Move to the Web 1-23

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 1-24

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2004, Oracle. All rights reserved.

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Migrating Reports Applications

After completing this lesson, you should be able to do


the following:
Describe the difference between deprecated and
obsolete functionality
Describe the migration path for Reports
applications that were developed with previous
releases of Oracle Reports
Identify enhancements in the Reports Builder user
interface
Migrate a Reports application by replacing
deprecated and obsolete functionality

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 2-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

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.

Copyright 2005, Oracle. All rights reserved.

Deprecated and Obsolete Functionality


With any product, the usefulness of its technology begins to diminish over time.
Deprecated functionality is at a point where product advances and enhancements have caused
the functionality to be incorporated using another approach, or its general usefulness has been
superseded by other precedents. As a result, that functionality is no longer documented and its
use is discouraged, because it will be made obsolete in a subsequent release of Oracle Reports.
The deprecation phase is provided so that customers can gradually migrate to new functionality
before the deprecated functionality is made obsolete.
Obsolete functionality is no longer available in Oracle Reports 10g Release 2 (10.1.2). By
continuing to remove obsolete functionality and replacing it with new technology, Oracle
Reports developers ensure that customers always have the latest functionality they need for
successful e-business development and deployment.
Note: For details about deprecated, obsolete, and changed functionality, refer to the document
Oracle Reports 10g: Statement of Direction on the Oracle Technology Network
(http://www.oracle.com/technology/products/reports/10g/SOD_Reports.html).

Oracle Reports Developer 10g: Move to the Web 2-3

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Deprecated and Obsolete Functionality

Changed Functionality and Naming


Oracle Reports has improvements in functionality with every new release. In keeping with new
and enhanced functionality, it was necessary to change the names of some of the properties,
executables, and interfaces. For example, because the parameter form is applicable only to the
paper layout, and not to the Web layout, the previously named Parameter Form view in
Reports Builder is now called Paper Parameter Form view.
Functionality changes include:
Behavior of the command line keyword BACKGROUND
Behavior of the command line keyword BATCH
Naming changes include:
Executable names
Environment variable names
Reports Builder user interface names

Oracle Reports Developer 10g: Move to the Web 2-4

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Deprecated and Obsolete Functionality (continued)


Functionality that is deprecated in Oracle Reports 10g Release 2 (10.1.2), or deprecated in earlier
releases (Oracle9i Reports or Oracle Reports 10g (9.0.4)), includes:
Executables
Environment variables

SRW.SET_ATTR built-in function


SRW built-in parameters related to formatting
SRW built-in procedures and parameters related to tracing
Embedding an OLE2 object
Oracle Express data source and related options
Reports Server clustering
Import Portal component
User exits
Functionality that is obsolete in Oracle Reports10g Release 2 (10.1.2), or made obsolete in
earlier releases (Oracle9i Reports or Oracle Reports 10g (9.0.4)), includes:
Character mode run-time viewer
Graphical user interface for reports run time
Oracle Graphics
Executables applicable to client/server environments
Command line keywords
System parameters
Oracle Forms built-in RUN_PRODUCT for submitting report requests
Running the Reports Server as a Windows service
Creating buttons in the layout model
Defining external queries
PVCS and Clearcase for source control
Storing report definitions in the database
Oracle Reports Call Interface
MAPI email protocol
Web Wizard

1. Open your .rdf in Reports Builder 10g.


2. Replace deprecated and obsolete functionality.
3. Recompile any PL/SQL.
4. Save your report definition.
6i

10g

Copyright 2005, Oracle. All rights reserved.

Migrating Reports Applications


The report applications you created with Oracle Reports 6i have the extension .rdf (report
definition file). These report definitions include one layouta paper layout. You should be able
to run your existing .rdf files with Oracle Reports 10g with no modifications, except for
replacing obsolete functionality. You may need to open the report definitions in Reports Builder
10g, recompile any PL/SQL, and save the report.

Oracle Reports Developer 10g: Move to the Web 2-5

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Applications

Report Editor views:


Data Model
Web Source
Paper Layout
Paper Design
Paper Parameter Form
Other UI changes:
Previewer
Property Inspector

Copyright 2005, Oracle. All rights reserved.

Reports Builder User Interface Changes


When you open your old report definitions in Reports Builder, you will notice changes in the
user interface.
As you know, every report module defines two key components in a report: the data and the
layout. Beginning with Oracle9i Reports, each report module can have a data model, a paper
layout, and a Web layout. The data model, as well as program units, can be shared by the paper
and Web layouts. The Object Navigator includes a Web Source node for every report module.
The Report Editor has been enhanced to include a Web Source view. The Web Source view
displays the HTML and JSP source for a report. The other Report Editor views are Data Model,
Paper Layout (previously called Layout Model), Paper Design (previously called Live
Previewer), and Paper Parameter Form (previously called Parameter Form). The Object
Navigator also reflects the name changes.
The Runtime Previewer has been renamed Previewer. To display the printed version of a report
on your screen, access the Previewer by selecting File > Print Preview from the menu.
The Property Palette has been renamed Property Inspector.

Oracle Reports Developer 10g: Move to the Web 2-6

Oracle University and DATACTIVA Consultoria y Servicios 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 Builder User Interface Changes

To visually format fields in your report, use the new


attribute-specific built-ins, such as:
srw.set_background_fill_color
srw.set_font_face
srw.set_fill_pattern
srw.set_text_color
srw.set_border_width

March 7th

Copyright 2005, Oracle. All rights reserved.

Formatting with the SRW Built-in Package


The SRW.SET_ATTR built-in function was originally designed to save time and resources by
allowing you to set attributes such as font face, foreground and background colors, border width,
and so on using a single built-in function. However, each of these attributes has evolved into a
separate built-in function (for example, SRW.SET_FONT_FACE and
SRW.SET_BORDER_WIDTH).
Note: To replace deprecated SRW.SET_ATTR functionality and attributes with new SRW builtin procedures in the PL/SQL code in your report, refer to the Deprecated SRW.SET_ATTR
functionality table in the document Oracle Reports 10g: Statement of Direction on the Oracle
Technology Network
(http://www.oracle.com/technology/products/reports/10g/SOD_Reports.html).

Oracle Reports Developer 10g: Move to the Web 2-7

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Formatting with the


SRW Built-in Package

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 Reports Developer 10g: Move to the Web 2-8

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Formatting with the SRW Built-in Package (continued)


Example: You want to display salaries greater than $2,000 with specific visual characteristics,
such as font style, size, weight, and so on. In your 6i report, you coded a format trigger, built an
attribute mask, and applied that mask to the salary field if the value in the field was greater than
2,000. Your code looked something like this:
if :salary > 2000 then
srw.attr.mask := srw.face_attr +
srw.sz_attr +
srw.weight_attr +
srw.style_attr +
srw.gcolor_attr;
srw.attr.face := times;
srw.attr.sz := 18;
srw.attr.weight := srw.bold_weight;
srw.attr.style := srw.underline_style;
srw.attr.gcolor := blue;
srw.set_attr (0, srw.attr);
end if;
return(TRUE);

Copyright 2005, Oracle. All rights reserved.

Replacing OLE2 Objects


Oracle6i Reports supported the use of OLE2 (Object Linking and Embedding). In the Builder,
you were able to create an OLE2 container and define its contents, such as a spreadsheet,
graphics, video, or sound. This functionality is applicable only to client/server environments.
To migrate a report containing an embedded OLE2 object, you must delete the OLE2 object
from the report definition. There is no direct replacement in Oracle Reports 10g because this
functionality is not applicable to Web environments. However, you can mimic this functionality
by using one of two options:
Display images and text from external files by using the File Link tool in the Paper Layout.
If you have access to a Java plug-in that can read and embed an object (for example, a
Microsoft Word document or Microsoft Excel file), you can use the plug-in inside Oracle
Reports via the Java Importer utility.

Oracle Reports Developer 10g: Move to the Web 2-9

Oracle University and DATACTIVA Consultoria y Servicios 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 OLE2 Objects

Oracle6i Reports

Oracle Reports 10g


Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 2-10

Oracle University and DATACTIVA Consultoria y Servicios 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

Migrating Charts (continued)

Oracle Reports Developer 10g: Move to the Web 2-11

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 2-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

Replacing Buttons

Copyright 2005, Oracle. All rights reserved.

Referencing System Parameters


Reports Builder provides system parameters that you use to modify standard run-time settings
for each report definition. Each parameter has a default value that you can modify.
In Oracle Reports 10g, there are seven system parameters: COPIES, DESFORMAT, DESNAME,
DESTYPE, MODE, ORIENTATION, and PRINTJOB.
The system parameters BACKGROUND, CURRENCY, DECIMAL, and THOUSANDS are obsolete.
Instead, use the new methods of configuration such as setting the appropriate environment
variable or using command line keywords.

Oracle Reports Developer 10g: Move to the Web 2-13

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Referencing System Parameters

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.

CURRENCY: The currency


character to be used in
number formats

Set the NLS_CURRENCY environment variable.

DECIMAL: The decimal


character to be used in
number formats

Set the NLS_NUMERIC_CHARACTERS


environment variable.

THOUSANDS: The
thousands character to be
used in number formats

Set the NLS_NUMERIC_CHARACTERS


environment variable.

Oracle Reports Developer 10g: Move to the Web 2-14

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Referencing System Parameters (continued)


Refer to the following table to replace the obsolete system parameters in your reports with the
new functionality.

ORA_JAVA built-in package

Java Importer
ORA_FFI built-in package

Copyright 2005, Oracle. All rights reserved.

Replacing User Exits


In earlier releases of Oracle Reports, user exits provided a way in which to pass control (and
possibly arguments) from Oracle Reports to another Oracle product or 3GL, and then return
control (and possibly arguments) back to Oracle Reports.
With Oracle Reports 10g, you can call Java methods by using the ORA_JAVA built-in package
and the Java Importer. This reduces the need to have user exits in a report and allows for a more
open and portable deployment. You can also use the ORA_FFI built-in package, which provides
a foreign function interface for invoking C functions in a dynamic library.
The ORA_JAVA built-in package provides an interface for invoking Java classes from
PL/SQL.
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. Beyond
simply 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.

Oracle Reports Developer 10g: Move to the Web 2-15

Oracle University and DATACTIVA Consultoria y Servicios 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 User Exits

Oracle Reports Developer 10g: Move to the Web 2-16

Oracle University and DATACTIVA Consultoria y Servicios 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 User Exits (continued)


The ORA_FFI package provides a foreign function interface for invoking C functions in a
dynamic library.
Note: With the availability of these new built-in functions, the use of user exits is discouraged in
Oracle Reports 10g. However, makefiles will continue to be supplied to permit you to work with
existing user exits.

Reports executables are replaced with new


executables, including:
rwrbe60: Reports Background Engine
rwisv60: Interactive Server
rwows60: Oracle Application Server cartridge
obe60: Query Builder
gorun60: Oracle Graphics Runtime
gobld60: Oracle Graphics Builder
gobat60: Oracle Graphics Batch

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 2-17

Oracle University and DATACTIVA Consultoria y Servicios 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

gorun60 (Graphics Runtime)

gobld60 Graphics Builder

gobat60 Graphics Batch

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 Reports Developer 10g: Move to the Web 2-18

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


obe60 (Query Builder): Query Builder functionality has been available from within the
Builder since Oracle9i Reports. Because Query Builder is no longer available as a standalone tool, this executable is not needed. Action required: Use Query Builder from within
Reports Builder.
Oracle Graphics executables:

Number formatting
CURRENCY
THOUSANDS
DECIMAL

Tracing
PROFILE
ERRFILE
LOGFILE

Key strokes
KEYOUT
KEYIN

Copyright 2005, Oracle. All rights reserved.

Replacing Command Line Keyword Functionality


Command line keywords and their values are used to provide information to the Oracle Reports
executables when run from the command line. There are several command line keywords that
are obsolete in Oracle Reports 10g. The functionality provided by these command line keywords
is either now provided by new keywords or environment variables that give you more
comprehensive options, or it is no longer needed.
Obsolete Keyword
CURRENCY: The currency
character to be used in number
formats

Action Required
Set the NLS_CURRENCY environment variable.

THOUSANDS: The thousands


separator to be used in number
formats

Set the NLS_NUMERIC_CHARACTERS environment


variable. If not set, the default value is based on the
language derived from the NLS_LANG variable.

DECIMAL: The decimal


character to be used in number
formats

Set the NLS_NUMERIC_CHARACTERS environment


variable. If not set, the default value is based on the
language derived from the NLS_LANG variable.

Oracle Reports Developer 10g: Move to the Web 2-19

Oracle University and DATACTIVA Consultoria y Servicios 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 Command Line Keyword


Functionality

Obsolete Keyword

Action Required

PROFILE: Name of the file


that stores performance
statistics

Use TRACEOPTS=TRACE_PRF to write the specific


performance statistics in the trace file. See Oracle Reports
Online Help for complete list of options.

ERRFILE: Name of the file


that stores the error messages

Use TRACEOPTS=TRACE_ERR to write the specific error


messages in the trace file. See Oracle Reports Online Help
for complete list of options.

LOGFILE: Name of the file


that stores status and error
output

Use a third-party application to capture screen print.

KEYIN: Name of a keystroke


file that executes at run time

No action is required because this is obsolete functionality


due to the removal of client/server and character mode
GUI.

KEYOUT: Name of a keystroke


file that records at run time

No action is required because this is obsolete functionality


due to the removal of client/server and character mode
GUI.

Oracle Reports Developer 10g: Move to the Web 2-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

Replacing Command Line Keyword Functionality (continued)

In this lesson, you should have learned how to:


Describe the difference between deprecated and
obsolete functionality
Describe the migration path for Reports
applications developed with previous releases of
Oracle Reports
Identify enhancements in the Reports Builder user
interface
Migrate a Reports application by replacing
deprecated and obsolete functionality

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 2-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

Summary

This practice covers the following topics:


Identifying potential problem areas in a report due
to deprecated and obsolete features
Replacing SRW.SET_ATTR functions in a format
trigger
Replacing button functionality with an image and
link

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 2-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

Practice 2: Overview

Oracle Reports Developer 10g: Move to the Web 2-23

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Developing Reports for the Web

After completing this lesson, you should be able to do


the following:
Describe the differences between Web publishing
and paper publishing
Create a Web report using the Report Wizard
Examine the Web source code using the Report
Editor
Add dynamic content to a Web page
Customize Web reports
Create a Web layout template
Build an HTML parameter form for a Web report
Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 3-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

Objectives

GIF89a
hyperlinks
JavaScript

Copyright 2005, Oracle. All rights reserved.

What Is Web Publishing?


Today, businesses turn to the Web first to find information. A Web page is very fluid. A Web
page does not have the limitation of page size; a page can contain as much or as little data as you
want. If there is more content than can fit in the browser window, scroll bars are displayed to
allow users to navigate through the content. Web-specific features, such as bookmarks and
hyperlinks, can also aid the user in navigation.
A Web page comes alive with rich images, color, JavaScript, and animation. Users can
interactively drill down to see details or related data. Style sheets are used to universally control
appearance.
In previous releases of Oracle Reports, the Web feature simply displayed paper reports (that is,
multiple pages) in HTML or PDF. This moved corporate data onto the Web, but also resulted in
large and somewhat inflexible HTML pages. With a focus on Web publishing, Oracle Reports
uses JavaServer Pages (JSPs) as the underlying technology to enable you to enhance Web pages
with information. An additional advantage of this technology is that you can have both JSPbased and paper-based definitions in a single report.

Oracle Reports Developer 10g: Move to the Web 3-3

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

What Is Paper Publishing?


A paper report has characteristics that include rigid geometric restrictions, headers and footers
repeated on each page, and higher resolution allowing more details to be presented to the end
user at once, giving the end user the option of printing the output and the ability to study the
data.
Oracle Reports has historically done a very good job of publishing high-fidelity paper reports.
The tool understands the concept of a paper page. It manages geometry and includes features to
control behavior when a page break occurs.
Effective Publishing
The key to effective publishing is understanding the medium, utilizing the functionality the
medium provides, and generating visually attractive content for that medium. For the Web, this
means the ability to incorporate Java, JavaScript, and animated Graphic Interchange Formats
(GIFs). For paper, it requires the understanding of paper layouts and complicated geometry
management.
Recognizing the differences between Web publishing and paper publishing, Oracle Reports
provides a declarative environment with the power to generate high-quality output for the Web
and e-business requirements, as well as high-fidelity paper reports.

Oracle Reports Developer 10g: Move to the Web 3-4

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

High-Quality Web Publishing


HTML is the de facto standard for publishing information on the Web. The organization of
content for the Web must be more visually appealing than paper, and often includes animated
GIF images, JavaScript code, and Java applets. You are concerned with publishing information
from corporate data sources and the tool you use must be capable of combining static as well as
dynamic information in a single page.
Several Web authoring tools exist today for designing and developing high-quality Web pages.
These products address static publishing, and in order to include dynamic content, you often
must resort to programming. Web designers and developers are challenged to define and
generate complex, dynamic content for an enterprise information portal or corporate Web page.
Oracle Reports is a powerful enterprise reporting tool for building and publishing high-quality,
dynamically generated Web reports. Through data-driven tables of contents, hyperlinks, and
drilldown chart hyperlinks, Oracle Reports provides users with an easy path to the information
they require.

Oracle Reports Developer 10g: Move to the Web 3-5

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

High-Quality Web Publishing

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 Reports Developer 10g: Move to the Web 3-6

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

High Quality Web Publishing (continued)


JSP-Based Runtime Environment

Server-side technology
Dynamic scripting capability for Web pages
Enables the separation of dynamic and static
content in a Web page

Copyright 2005, Oracle. All rights reserved.

What Is JavaServer Pages (JSP) Technology?


JavaServer Pages technology is an extension to the Java servlet technology from Sun that
provides a simple programming vehicle for displaying dynamic content on a Web page. JSP is a
server-side technology. A JSP is an HTML page with embedded Java source code that is
executed in the Web server or application server. The HTML provides the page layout that you
view using the Web browser, and the Java code provides the business logic.

Oracle Reports Developer 10g: Move to the Web 3-7

Oracle University and DATACTIVA Consultoria y Servicios 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 JSP Technology?

Separation of dynamic and static content


Support for scripting and tags
Reuse of components and tags
Portability, powerful features, and ease of use
Accepted industry standard for building dynamic
Web pages

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 3-8

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 3-9

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


Because JSPs cleanly separate dynamic application logic from static HTML content, page
designers who have limited or no Java programming expertise can modify the appearance of the
JSP page without affecting the generation of its content. The separation of the HTML coding and
the business logic in a Web page allows HTML programmers and Java programmers to more
easily collaborate in creating and maintaining applications. The application logic itself can reside
in server-based resources that the Web page accesses through tags that are similar to XML tags.
Another advantage of using JSPs is that they are easy to code. JSPs are compiled just in time,
offering faster performance with maximum portability. JSPs are rapidly becoming the standard
environment for enterprise Web publishing. JavaServer Pages are recursive and can execute
different code streams within the HTML, making them more versatile for deploying information
on the Web.
For more information about JSP technology, see the JavaSoft Web site at http://
www.javasoft.com/products/jsp/.

<HTML>
<HEAD><TITLE>Simple HTML Example</TITLE></HEAD>
<BODY>
Welcome to my page!! <br>
Current time is :
</BODY>
</HTML>

Copyright 2005, Oracle. All rights reserved.

Simple HTML: Example


Before you learn about Reports JSPs, youll look at a very basic JSP example. Start with a
simple HTML file that displays a greeting and a text string:
<HTML>
<HEAD><TITLE>Simple HTML Example</TITLE></HEAD>
<BODY>
Welcome to my page!! <br>
Current time is :
</BODY>
</HTML>
This file can be viewed in your browser. It is completely static.

Oracle Reports Developer 10g: Move to the Web 3-10

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Simple HTML: Example

<HTML>
<HEAD><TITLE>Simple JSP Example</TITLE></HEAD>
<BODY>
Welcome to my page!! <br>
Current time is :
<%= new java.util.Date() %>
</BODY>
</HTML>

Copyright 2005, Oracle. All rights reserved.

Simple JSP: Example


A JSP adds dynamic content to a static HTML page. The source code from the simple HTML
example has been modified to include a Java expression that prints out the current date:
<HTML>
<HEAD><TITLE>Simple JSP Example</TITLE></HEAD>
<BODY>
Welcome to my page!! <br>
Current time is:
<%=new java.util.Date()%>
</BODY>
</HTML>
The first five lines of code are standard HTML code, defining the title and start of the body
of the page.
The line that follows prints the date and time using a Java expression between the <%= and
%> tags. This expression creates a new instance of the java.util.Date type, which is set to
the current time when the object executes.
The Java expression is evaluated each time the page is reloaded in the browser.

Oracle Reports Developer 10g: Move to the Web 3-11

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Simple JSP: Example

Two options:
Use the Report Wizard to create a new report.
Open an existing HTML page in Reports Builder
and embed Oracle Reports data.

Copyright 2005, Oracle. All rights reserved.

Building a Web Report


You can easily create Web reports using the declarative features in Oracle Reports.
You have two options for building a Web report:
You can use the Report Wizard to define the data model and Web layout, and optionally,
choose one of the predefined HTML templates that are shipped with Oracle Reports.
You can design a Web page using your favorite HTML authoring tool. You open your
HTML page in Reports Builder and add dynamic content to the page. The dynamic data is
injected into the appropriate sections of the page using JSP tags. You can use the Report
Block Wizard to do this or you can enter the code manually using the Web Source view of
the Report Editor.
In this lesson, you first learn how to use the Report Wizard and a predefined HTML template to
build a Web report and save it in JSP format. Later in this lesson, you learn how to add dynamic
content to an existing Web page using the Report Block Wizard and the Web Source view of the
Report Editor.

Oracle Reports Developer 10g: Move to the Web 3-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

Building a Web Report

Copyright 2005, Oracle. All rights reserved.

Using the Report Wizard


When you use the Report Wizard to create your reports, the wizard gives you the option of
generating a Web or paper layout for a single report definition. The default option is to create
both a Web and paper layout. Recall that every report definition has a data model and a layout.
The same data model can be shared by a Web layout and paper layout.
To use the Report Wizard and a predefined HTML template, create the report definition just as
you would a paper report. Proceed through the steps of the Wizard and select the report style,
data source, fields to display, and so on. From the templates page, select one of the predefined
templates. The list of predefined templates is the same as it is for paper reports. Oracle Reports
provides corresponding HTML templates and style sheets for your Web reports. You will learn
more about HTML templates and style sheets later in this course.
When you click Finish in the wizard, Reports Builder generates the layout type that you selected.
If you opted for both Web and paper layout, the Paper Design view displays by default. If you
opted for Web layout only, the Web Source view of the Report Editor is displayed.

Oracle Reports Developer 10g: Move to the Web 3-13

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using the Report Wizard

Reports JSP
custom tag
library
Start of report
Data model
information
HTML template
information

End of report

Copyright 2005, Oracle. All rights reserved.

Web Source View


The Web Source view of the Report Editor displays the source code for your Web report,
including HTML tags and JSP tags. The view presents a Web page in which you can add
dynamic report blocks using the Report Block Wizard, and graphs using the Graph Wizard. In
addition, you can customize Reports JSPs by editing the Web source by using standard HTML
tags and attributes or by using Reports custom tags to obtain the desired results.
Every report module contains a Web source component, regardless of whether a Web layout has
been created or not. If you open the Web Source view for a new report module for which no data
model or layout has been defined, you will see that the view is not empty. Reports Builder
provides the required JSP declarations for any report module, as well as place holders for the
content that the Report Wizard will create.
To display the Web Source view, do one of the following:
Select View > Change View > Web Source from the menu in the Report Editor.
Select the Web Source icon in the horizontal toolbar in the Report Editor.
Double-click the icon next to the Web Source node in the Object Navigator.

Oracle Reports Developer 10g: Move to the Web 3-14

Oracle University and DATACTIVA Consultoria y Servicios 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 Editor: Web Source View

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 Reports Developer 10g: Move to the Web 3-15

Oracle University and DATACTIVA Consultoria y Servicios 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 Source View (continued)


A Reports JSP includes both standard JSP tags and Reports custom JSP tags.

Standard JSP tags


taglib
page

Reports custom JSP tags

rw:report
rw:objects
rw:foreach
rw:field
rw:include

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 3-16

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 3-17

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


Reports Custom JSP Tag Library

Copyright 2005, Oracle. All rights reserved.

Web Source: Example


The Web source in this example was generated by the Report Wizard using the following
specifications:
Style: Tabular
Data source: SQL query
Data:
SELECT
FIRST_NAME, LAST_NAME, EMAIL, HIRE_DATE
FROM
EMPLOYEES
Fields: Display all fields
Template: Blue
The code generated by Reports Builder for the data model of the report is shown in the slide.

Oracle Reports Developer 10g: Move to the Web 3-18

Oracle University and DATACTIVA Consultoria y Servicios 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 Source: Example

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 Reports Developer 10g: Move to the Web 3-19

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 3-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

Generating Output

Report Block Wizard


Graph Wizard
<body>

</body>
Data model

Web source

JavaServer Pages (JSP)

Copyright 2005, Oracle. All rights reserved.

Adding Dynamic Content to a Web Page


Youve learned how to create Web reports using the Report Wizard and one of the HTML
templates supplied by Oracle Reports. As an alternative, you can open an existing Web page (an
HTML document) in Reports Builder and embed your report data into the page. Your HTML
document can be a corporate standard or you can design your own Web page using your favorite
HTML authoring tool.
In this section, you learn how to add dynamic content to an existing Web page.

Oracle Reports Developer 10g: Move to the Web 3-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

Adding Dynamic Content

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 Reports Developer 10g: Move to the Web 3-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

Adding Dynamic Content to a Web Page (continued)


Defining the Data Model

Copyright 2005, Oracle. All rights reserved.

Creating a Report Block


Now that you have defined the data for your report, you are ready to create a report block and
add it to your Web page. The report block automatically inserts the data model, business logic,
and Web layout for the report. Each time the report is run, the report block dynamically pulls the
data defined by the data model into your Web page.
In order to insert a report block into your Web page, open the Web Source view for your report.
The report block must go between the <body> and </body> tags. These are standard HTML
tags that delimit the start and end of the body of the Web page, respectively.
As you learned earlier, organizations often have a team of Web designers to create visually
appealing and effective Web pages for publishing. The designers can manually code the HTML
or use any HTML authoring tool. Web designers typically include a placeholder in the HTML
code to indicate where you, as the Reports developer, must add the report data. This is the
location in the code where you position your cursor to insert the report block.

Oracle Reports Developer 10g: Move to the Web 3-23

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating a Report Block

Example:
<p>&lt;Replace this text with a report block.&gt;</p>
Note: &lt; and &gt; 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 Reports Developer 10g: Move to the Web 3-24

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating a Report Block (continued)

Copyright 2005, Oracle. All rights reserved.

Invoking the Report Block Wizard


The Report Block Wizard is a version of the Report Wizard that you use to specify the layout of
the data. You can open an existing HTML document or a Web page, and embed a report in your
Web page using the Report Block Wizard.
To invoke the Report Block Wizard:
1. Position your cursor in the desired location in the Web source code.
2. Select Insert > Report Block from the menu.
3. Specify a title for your report and select a report style.
4. Select the group or groups as desired.
5. Select the fields you want to display in your report.
6. Modify the labels as necessary.
7. Select a template and click Finish.
Note: The template affects the report block only and will not alter the existing Web page.

Oracle Reports Developer 10g: Move to the Web 3-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

Invoking the Report Block Wizard

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 Reports Developer 10g: Move to the Web 3-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

Invoking the Report Block Wizard (continued)

Structure of a Reports JSP


<%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
<%@ page language="java" import="java.io.*" errorPage=/rwerror.jsp" %>

<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>

Copyright 2005, Oracle. All rights reserved.

Examining the Web Source Code


Now you will examine the code created for the report block, and learn more about the Reports
custom JSP tags, as well as some HTML tags.
Structure of a Reports JSP
Earlier in the lesson, you were introduced to the structure of a Reports JSP.
The first line of the JSP is a directive that identifies the Reports custom tag library. The page
directive on the second line of code identifies the scriptlet language, the Java classes to import,
and the JSP to display any unhandled errors.
The entire report resides within the body of the rw:report tag.
The data model and business logic reside within the rw:objects tag and are coded in XML.
If your report definition also contains a paper layout, it is located within the rw:objects tag
as well. Remember that the details of the data model and paper layout are hidden when you are
viewing the Web source in Reports Builder. Use a text editor to view the complete code.
The Web layout for your report is located within the HTML tag, which is the focus of this
section.

Oracle Reports Developer 10g: Move to the Web 3-27

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Examining the Web Source Code

Copyright 2005, Oracle. All rights reserved.

Examining the Web Source Code (continued)


Header Tag
The header tag is an HTML tag that contains a comment to help you locate the heading
information for your report: <!-- Header -->. Just below the header tag, you will find
<th> and <tr> tags. The code within these tags defines the column headers for your report. For
example:
<tr>
<th <rw:id id="HBEMPLOYEEID" asArray="no"/>
class="OraColumnHeader"> Employee ID</th>
This code identifies the column heading Employee ID. Note the <rw:id> tag. The rw:id tag
generates a unique Document Object Model (DOM), or HTML ID value for row and column
headers to produce HTML that provides access using assistive technology, such as screen
readers.

Oracle Reports Developer 10g: Move to the Web 3-28

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Examining the Web Source Code

...
<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"/> . . .
...

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 3-29

Oracle University and DATACTIVA Consultoria y Servicios 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="&nbsp;"> F_EMPLOYEE_ID </rw:field></td>
...

Copyright 2005, Oracle. All rights reserved.

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="&nbsp;"> 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
&nbsp 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 Reports Developer 10g: Move to the Web 3-30

Oracle University and DATACTIVA Consultoria y Servicios 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

This practice covers the following topics:


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

Copyright 2005, Oracle. All rights reserved.

Practice 3-1: Overview


The practice session for this lesson is divided into Part 1 and Part 2.
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.
For solutions to this practice, see Appendix A, Practice Solutions.

Oracle Reports Developer 10g: Move to the Web 3-31

Oracle University and DATACTIVA Consultoria y Servicios 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: Overview

Modify the classes in the style sheet.


Use HTML tags and attributes.
Use Reports custom tags.

Copyright 2005, Oracle. All rights reserved.

Customizing Oracle Reports JSPs


You can customize your Reports JSPs by:
Modifying the classes in the style sheet file
Using standard HTML tags and attributes
Using Oracle Reports custom tags

Oracle Reports Developer 10g: Move to the Web 3-32

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Oracle Reports JSPs

<rw:style id="rwbeige">
<link rel="StyleSheet" type="text/css" href="rwbeige.css">
</rw:style>

<td <rw:headers id="HFEMPLOYEEID"


src="HBEMPLOYEEID"/>
class="OraCellNumber"><rw:field
id="F_EMPLOYEE_ID" src=EMPLOYEE_ID"
nullValue="&nbsp;"> F_EMPLOYEE_ID </rw:field></td>

.OraCellNumber { color: #000000; background-color: #f7f7e7;


font-family: Arial, Helvetica, sans-serif; font-size: 10px ; textalign: right}

Copyright 2005, Oracle. All rights reserved.

Customizing Oracle Reports JSPs Using Style Sheets


When you select a template supplied by Oracle Reports, the headings and data in your report
block inherit the characteristics defined for the template through the templates style sheet. A
style sheet is a file that is used to store margins, tabs, fonts, headers, footers, and other layout
settings for a particular category of document. Style sheets (or cascading style sheets) are HTML
extensions that provide powerful formatting flexibility. When a style sheet is selected, its format
settings are applied to all the documents created with it. This saves the page designer or
programmer from having to redefine the same settings for each page.

Oracle Reports Developer 10g: Move to the Web 3-33

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Oracle Reports JSPs


Using Style Sheets

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 Reports Developer 10g: Move to the Web 3-34

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Oracle Reports JSPs Using Style Sheets (continued)


Example: In the Reports JSP source code shown, the Oracle Reports template rwbeige is
referenced. Specifically, the style sheet referenced is rwbeige.css. The EMPLOYEE_ID
field in the report uses the OraCellNumber class format. To learn the attributes of a particular
class format, you can view the .css file in a text editor. In this example, the OraCellNumber
class format is:
.OraCellNumber {color: #000000; background-color: #f7f7e7;
font-family: Arial, Helvetica, sans-serif; font-size: 10px ;
text-align: right}

<thead>
<tr>
<th <rw:id id="HBEMPLOYEEID" asArray="no"/>
class="OraColumnHeader"> Employee Id </th>

<th <rw:id id="HBSALARY" asArray="no"/> align="right"


bgcolor="yellow"> Salary </th>
</tr>
</thead>

Copyright 2005, Oracle. All rights reserved.

Customizing Oracle Reports JSPs Using HTML Tags and Attributes


If you want to customize particular instances of a class in a report, you can edit the Web source
code directly and use standard HTML tags and attributes or Reports custom tags to obtain the
desired results.
If you are familiar with standard HTML tags and attributes, you can edit your Web source and
customize your report this way.
In the slide above, the column headings in the report block use the OraColumnHeader class.
Note the reference for the Employee ID header.
The header for the Salary column is customized. The OraColumnHeader class reference was
deleted from the Web source code, and replaced with standard HTML format attributes for
alignment and background color. In this example, the Salary column header is aligned right and
the header text is displayed with a background color of yellow.

Oracle Reports Developer 10g: Move to the Web 3-35

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Oracle Reports JSPs


Using HTML Tags and Attributes

Tag attributes provide additional formatting functionality,


as in the following example.
rw:field tag optional attributes:

breakLevel

breakValue

nullValue

containsHtml

formatMask

formatTrigger

Copyright 2005, Oracle. All rights reserved.

Customizing Reports JSPs Using Reports Custom Tags


Each Reports custom tag is defined with a list of attributes. While some attributes are mandatory,
others are optional. You can edit the Web source and include optional attributes to customize
your Reports JSP. The optional attributes provide additional formatting for the referenced object.
For example, the rw:field tag can be defined with the following optional attributes:

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 &nbsp.

nullValue: This sets the value to be used if the fields value is null. The default value is
&nbsp.

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 &lt. The
default value is No.
Note: JSP attributes, in general, are case sensitive.

Oracle Reports Developer 10g: Move to the Web 3-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

Customizing Reports JSPs


Using Reports Custom Tags

Oracle Reports Developer 10g: Move to the Web 3-37

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Reports JSPs Using Reports Custom Tags (continued)

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.

<tbody> <rw:foreach id="R_G_EMPLOYEE_ID_1"


src="G_EMPLOYEE_ID">
<tr>

<td
<rw:headers id="HFSALARY" src="HBSALARY"/>
align=right">
<rw:field id="F_SALARY" src="SALARY"
nullValue="&nbsp;" formatMask="$999,999.00" >
F_SALARY
</rw:field>
</td>

</tr>
</rw:foreach> </tbody>

Copyright 2005, Oracle. All rights reserved.

Customizing Reports JSPs Using Reports Custom Tags (continued)


The slide above shows an example of using Reports custom tag attributes to modify the
appearance of a field in a report. A format mask is included to display the values returned from
the salary column. Use standard Reports format tokens to create format masks for fields
containing numbers and dates.
Another implementation of customizing Reports JSPs using custom tag attributes is to set your
report parameters in the rw:report tag. For example:
<rw:report id="report" parameters="server=rep-server&
userid=hr/hr@orcl&destype=cache&desformat=htmlcss">
This rw:report tag references the parameters attribute. The parameter list specifies the name
of the server; username, password, and database connect string; destination type; and destination
format. You can run this report using OracleAS Reports Services without providing the
parameters again. However, the values specified in the parameters attribute can be overridden by
providing new values in the URL when the report is run. The settings in the parameters attribute
have the lowest precedence.

Oracle Reports Developer 10g: Move to the Web 3-38

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Reports JSPs


Using Reports Custom Tags

Copyright 2005, Oracle. All rights reserved.

Customizing Reports JSPs Using Reports Custom Tags (continued)


The slide shows the result of using the Oracle Reports custom tag attribute, formatMask, to
modify the appearance of the Salary field in the report.

Oracle Reports Developer 10g: Move to the Web 3-39

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Reports JSPs


Using Oracle Custom Tags

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 3-40

Oracle University and DATACTIVA Consultoria y Servicios 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:

Paper layout template (.tdf)


Web layout template (.html)
Cascading style sheet (.css)

Copyright 2005, Oracle. All rights reserved.

Creating a Web Layout Template


A Web layout template consists of three files:
The paper layout template, or template definition file (.tdf), is used to register the
template in Oracle Reports and to establish the relationship between the static HTML file
which defines the layout and the cascading style sheet.
The Web layout template file (.html) defines the layout of the template, that is, the
default header, footer, and position of the data area.
The cascading style sheet file (.css) defines the HTML fonts for the various elements in a
report.
Note: For the example in this lesson, we will use an existing cascading style sheet
(rwblue.css) with our Web layout template.

Oracle Reports Developer 10g: Move to the Web 3-41

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating a Web Layout Template

Copyright 2005, Oracle. All rights reserved.

Creating a Template Definition File


The first task in creating a template for your Web reports is to create a template definition file.
1. In Reports Builder, select File > New > Template from the menu. As a alternative, select
the Templates node in the Object Navigator and click the Create icon in the toolbar.
2. Specify a name for your template using the Property Inspector.
Note: Oracle Reports uses this template name only to create the relationship between the
HTML and CSS files. Any attributes that you specify for report objects in this template
definition file are not applied to a Web report.
3. Save your template definition file in the <oracle_home>\reports\templates\
directory.

Oracle Reports Developer 10g: Move to the Web 3-42

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating a Template Definition File

Copyright 2005, Oracle. All rights reserved.

Creating the HTML Page


The next step is to create an HTML page that defines the static portion of your Web template as
well as the placeholders for dynamic report content. Use a text editor or HTML editor, such as
Macromedia Dreamweaver, to create the HTML page.
1. Begin by entering the JSP header and taglib directive. Then, add the <rw:report> tag to
reference the Oracle Reports environment.
<%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
<%@ page language="java" import="java.io.*"
errorPage="/rwerror.jsp" session="false" %>
<!-<rw:report id="report">
<rw:objects id="objects">
</rw:objects>
-->

2. Next, add the tags for the document type and header:
<HTML>
<HEAD>

Oracle Reports Developer 10g: Move to the Web 3-43

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating the HTML Page

<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>

6. Close the Oracle Reports reference tag.


<!-</rw:report>
-->

7. Save this document as an HTML file in the directory


<oracle_home>\reports\templates\.

Oracle Reports Developer 10g: Move to the Web 3-44

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating the HTML Page (continued)


3. Add the <rw:style> tag. This tag is used to create a link between your HTML template
and the specific cascading style sheet that defines the fonts to be applied to the elements of
your Web report.

<webTemplate id="MyTemplate" cssFile="rwblue.css"


classSet="caboclassSet htmlFile="MyTemplate.html"/>

Copyright 2005, Oracle. All rights reserved.

Updating the Web Layout Template Description File


The Web layout template description file, rwTemplates.xml, references the Oracle Reports
Web layout templates with their associated CSS files. The file is located in the
<oracle_home>\reports\templates directory.
To register your template, edit rwTemplates.xml and add a new entry:
1. Using a text editor, open the file rwTemplates.xml.
2. Scroll down in the file and add a new entry. For example:
<webTemplate id=MyTemplate" cssFile="rwblue.css"
classSet="portletclassSet" htmlFile=MyTemplate.html"/>
where:
- id references the name of the module in the Reports template file
(mytemplate.tdf). This is not the name of the file, but the name that you see in
the Object Navigator.
- cssFile references the name of the cascading style sheet that the Report Wizard will
place in the <LINK> tag. In this example, rwblue.css is used.

Oracle Reports Developer 10g: Move to the Web 3-45

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Updating the Web Layout Template


Description File

Oracle Reports Developer 10g: Move to the Web 3-46

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Updating the Web Layout Template Description File (continued)


- classSet references the classSet ID into the current XML file. The classSet establishes
the relationship between each field type and the CSS class.
- htmlFile references the file name of the HTML template. In this example, it is
MyTemplate.html.
3. Save the file and restart Reports Builder.
Note: Make sure that your .css file is saved in the directory
<oracle_home>\reports\docroot\css before you create your Web report using
Reports Builder.
If your template contains images, copy the image files to the deployment directory of Reports
Builder (for example E:\temp\docroot\images).

Copyright 2005, Oracle. All rights reserved.

Testing the Web Layout Template


To test your Web layout template:
1. Create a new report using the Report Wizard. On the Template page of the wizard, select the
Template file option. Click Browse to locate your template in the file system.
2. Run the Web layout to preview your report output in the browser. Your report data should
appear with your template.

Oracle Reports Developer 10g: Move to the Web 3-47

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Testing the Web Layout Template

Copyright 2005, Oracle. All rights reserved.

Passing Parameters to a Web Report


Parameters enable you to develop dynamic report documents that produce variable report output
depending on the parameter value entered at run time. One way to pass a parameter value to a
report is though a parameter form. You can design a parameter form for both Web and paper
reports. However, at run time, the Runtime Parameter Form is displayed only when you run the
paper report layout. For JSP-based Web reports, the Runtime Parameter Form displays when you
run your report within Reports Builder for debugging purposes, but it is not displayed at run
time.
Because you have the flexibility to display your reports on any Web page, a report may be just
one object on a Web page containing many other portlets and objects, and parameters for the
report may be retrieved from sources other than the parameter form. For example, parameters
might be provided by the Web page and passed to all portlets on the page. Therefore, it does not
make sense to display a Runtime Parameter Form for JSP-based Web reports before the report is
formatted.

Oracle Reports Developer 10g: Move to the Web 3-48

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Passing Parameters to a Web Report

Oracle Reports Developer 10g: Move to the Web 3-49

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Passing Parameters to a Web Report (continued)


You must use an alternative method to provide required parameters to a JSP-based Web report
designed with a parameter form. Some of your options are:
Setting all parameters to a default value when you design the report
Passing parameters through the URL
Passing page level parameters to the report if the report displays as a portlet in a Web page
Creating an HTML form that your calls your report and provides parameter values, either
as static values or as a list of values using the Oracle Reports custom JSP tags
In this lesson, you learn how to build a simple HTML parameter form using JavaServer Pages
for a JSP-based Web report.
Scenario: You have an existing JSP-based Web report that displays a bar graph of employee
salaries per department, as well as a tabular report that displays the employee details. Your
customer wants to see the employee information for a specific department at run time, so that
they do not have to read the data for all departments. To accomplish this, you will:
Create a parameter form in HTML using a text editor.
Modify the HTML parameter form in Reports Builder using the Data Model and Web
Source views, and save the parameter form as a JSP.
Modify the query in the target report to accept parameters.
Test the parameter form and target report using the OC4J instance shipped with Oracle
Developer Suite.

Use a text editor or an HTML editor to create a Web


Page. Include the following:
List of values
Field
Button

Copyright 2005, Oracle. All rights reserved.

Creating the Parameter Form


To create a simple parameter form in HTML:
1. Use a text editor or an HTML editor and create an HTML page that contains a form. The
form should contain a list of values (LOV), a field, and a button. Your code can look like
this:
<form name="form1" method="post" action="">
<h2>Parameter Form</h2>
<p>Choose a department from the list, then click the <b>Run
Report</b> button to show salary details for each employee
in that department.</p>
<select name="p_department" size="1">
<option value="1">a</option>
</select> <br>
<input type="text" name="userid" value="hr/hr@db-connect">
<br> <input type="submit" name="Submit" value="Run Report">
</form>

Oracle Reports Developer 10g: Move to the Web 3-50

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating the Parameter Form

Oracle Reports Developer 10g: Move to the Web 3-51

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating the Parameter Form (continued)


Note: If you use the sample code, you must change the userid value to reflect the
connection information for your data source, as in the following example:
value="hr/hr@db-connect
2. Save your HTML file.
3. Display the file in your browser. It should look something like this:

Copyright 2005, Oracle. All rights reserved.

Modifying the HTML Parameter Form in Reports Builder


The next step is to modify an HTML parameter form in Reports Builder to dynamically populate
the LOV you created in the form with values from a data source. You use custom JSP tags to
enable the parameter form to access elements from a data model.
To create the data model:
1. Open your HTML file in Reports Builder.
2. In the Object Navigator, double-click the icon next to the Data Model node to display the
Data Model view.
3. In the Data Model view, click the SQL Query tool in the tool palette, then click in an open
area of the Data Model view to display the SQL Query Statement dialog box. Define a
query to return an alphabetized list of department names and their corresponding
department numbers:
select
department_name, department_id
from
departments
order by
department_name
4. Click OK.
5. Save the report module (that is, the HTML parameter form) as a .jsp file.

Oracle Reports Developer 10g: Move to the Web 3-52

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Modifying the HTML Parameter Form in


Reports Builder

Oracle Reports Developer 10g: Move to the Web 3-53

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Modifying the HTML Parameter Form in Reports Builder (continued)


Now modify the Web source of your parameter form to populate the LOV with data retrieved
from the data model you just defined.
To modify the LOV:
1. Click the Web Source button in the toolbar to display the Web Source view.
2. Locate the following code:
<select name="p_department" size="1">
<option value="1">a</option>
</select>
This LOV returns a static value. The display name is "a" and the value is "1". You must
change this HTML element to dynamically retrieve data that is based on your data
model.
3. Modify the code as follows:
<select name="p_department">
<rw:foreach id="fn" src="G_department_name">
<option value="<rw:field id="f_deptId"
src="department_id"/>"><rw:field id="deptname1"
src="department_name"/>
</option>
</rw:foreach>
</select>
4. Save your modifications.
5. Run the Web layout for the parameter form. The form displays in your browser, and the
Department field now contains a list of all the department names.
Examine the new Web source code:
The display name of the LOV, option, was replaced by the field department_name
from the data model. When the user displays the parameter form, the department names
will be displayed in the list.
The <rw:field> element accesses each element of the g_department_name group.
The <rw:foreach> element iterates through the results based on the
g_department_name group in the data model.
The src parameter is used in both <rw:foreach> and <rw:field> elements. For the
<rw:foreach> element, src must match the group name of the data model
(G_department_name). For the <rw: field> element, it must match the field that is referred
(department_name).
The id parameter can be any value, but it must be unique. This parameter also applies to
both <rw:foreach> and <rw:field> elements.

Modify the query to accept parameters:

:P_DEPARTMENT

Copyright 2005, Oracle. All rights reserved.

Setting Up the Target Report


The next step is to modify the query in the target report to accept parameters. The query in our
example currently returns information for employees in department 100 only. To modify the
query:
1. Open the report in Reports Builder.
2. In the Object Navigator, double-click the icon next to the Data Model node to display the
Data Model view.
3. Double-click the query to display the SQL Query Statement dialog box. Modify the WHERE
clause to reference a bind variable for department ID:
WHERE (EMPLOYEES.MANAGER_ID = EMPLOYEES_A1.EMPLOYEE_ID)
AND EMPLOYEES.DEPARTMENT_ID = :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 Reports Developer 10g: Move to the Web 3-54

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Setting Up the Target Report

Use the embedded OC4J in Reports Builder to test the


parameter form with your Web report:
Copy the parameter form and the Web report to
<oracle_home>\reports\j2ee\reports_ids\w
eb.
Modify the action attribute in the parameter form
to execute the report.
Run the parameter form using a URL.

Copyright 2005, Oracle. All rights reserved.

Testing the Parameter Form


To deploy your parameter form and target report, you must copy both JSP files to the
deployment directory of your application server. For testing purposes, however, you can use the
embedded Oracle Container for J2EE (OC4J) instance shipped with Oracle Developer Suite 10g.
After you have copied the target report to the desired directory, you can modify the parameter
form to point to the report.
To test your parameter form using the embedded OC4J instance:
1. Copy both your parameter form and target Web report to
<oracle_home>\reports\j2ee\reports_ids\web.
2. Copy any images to
<oracle_home>\reports\j2ee\reports_ids\web\images.
3. In Reports Builder, open the parameter form (.jsp) from the directory
<oracle_home>\reports\j2ee\reports_ids\web.
4. Display the Web Source view. You need to modify the action attribute so that when the
user clicks the Run Report button, the target report is executed using the selected
department. Locate the action attribute. Modify the code to point to your report:
<form name="form1" method="post"
action=reports/salaryrpt.jsp">
5. Save your report.
Oracle Reports Developer 10g: Move to the Web 3-55

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Testing the Parameter Form

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 Reports Developer 10g: Move to the Web 3-56

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Testing the Parameter Form (continued)


6. Start your OC4J instance. From the Start menu, choose Programs > Oracle Developer Suite <oracle_home > Reports Developer > Start OC4J Instance.
Note: After the containers for J2EE are initialized, the OC4J instance has been started. Do
not close the DOS window because it is being used by the running OC4J instance.
7. Open your browser window and enter the URL for your parameter form following the
format:
http://computer_name:port/reports/paramform.jsp?userid=
userid/password@database_name
For example:
http://my_computer:8889/reports/paramform.jsp?userid=
hr/hr@ORCL

In this lesson, you should have learned how to:


Describe the differences between Web publishing
and paper publishing
Create a Web report using the Report Wizard
Examine the Web source code using the Report
Editor
Add dynamic content to a Web page
Customize Web reports
Create a Web layout template
Build an HTML parameter form for a Web report

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 3-57

Oracle University and DATACTIVA Consultoria y Servicios 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

This practice covers the following topics:


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

Copyright 2005, Oracle. All rights reserved.

Practice 3-2: Overview


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.
For solutions to this practice, see Appendix A, Practice Solutions.

Oracle Reports Developer 10g: Move to the Web 3-58

Oracle University and DATACTIVA Consultoria y Servicios 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: Overview

Column

Label

product_id

Product No.

product_name

Name

product_description

Description

catalog_url

Catalog URL

Sort the output by product number.


b. Select the predefined Beige template.
c. Run the Web layout to test.
d. Save the report as p3q2.jsp.

Oracle Reports Developer 10g: Move to the Web 3-59

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 3-60

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


3. Create a new Web report by adding dynamic content to an existing Web page.
a. Open the file mywebpage.htm in Reports Builder.
b. Define a data model using the Data Wizard. Import the query p3q3.sql.
Use DEPARTMENT_ID and DEPARTMENT_NAME as the group fields.
Include a sum of the salaries.
c. Save the report as p3q3.jsp.
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 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.
e. Run the Web layout to test. Save the report.

Column

Label

Departments.department_name

Department

Employees.last_name

Last Name

Employees.first_name

First Name

Employees.job_id

Title

b. Save your report as p3_2q3.jsp.


c. Run the Web layout to test your template.

Oracle Reports Developer 10g: Move to the Web 3-61

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 3-62

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


4. Your customer at BioDiversity Umbrella, Inc. would like to be able to view employee
information for a specific department at run time. You agree to create a simple HTML
parameter form for the report.
a. Create an HTML page that contains a list of values, a field, and a button. The code
for this page is provided for you in the paramform.html file. Examine the code
using a text editor. Modify the connect string using the database credentials for your
class account. Save your modifications. Display the file in your browser.
b. Modify the HTML page in Reports Builder to dynamically populate the LOV in the
form with an alphabetized list of department names and corresponding department
numbers. Save the parameter form as a Reports JSP.
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.
d. Modify report p3_2q3.jsp to accept parameter to accept the
p_department parameter. Save the report as p3_2q4.jsp.

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Copyright 2005, Oracle. All rights reserved.

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Using New Features in Oracle Reports:


Development

After completing this lesson, you should be able to do


the following:
Create a report based on XML as the data source
Burst a report on repeating data
Generate a table of contents
Identify the PDF 1.4 features in Reports Builder
Specify inline HTML tags in fields
Use external style sheets in HTMLCSS output
Create a graph using the Graph Wizard
Use the Java integration features of Reports
Builder: JDeveloper and Java Importer
Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 4-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

Objectives

Access data from a variety of sources:


SQL-based
XML
Oracle OLAP
JDBC
Text

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 4-3

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 4-4

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


Data Source Types

JDBC

OLAP

SQL

Text
files

XML

Your
data
source

Oracle
Reports
Client

Oracle10g

Copyright 2005, Oracle. All rights reserved.

Pluggable Data Sources


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 interface definitions, which act as a translator between Oracle Reports and the
data source by redefining Oracle Reports requests in terms of the specific data source.
The PDS feature also enables you to leverage various capabilities in Oracle Reports such as
aggregation, summarization, formatting, and scheduling not only on data that is accessed through
SQL, but on data from any data source. In addition, access to these data sources can be
simplified because the PDS can take advantage of OracleAS Single Sign-On through the
SSOCONN command keyword and its associated login parameters. You learn more about
OracleAS Single Sign-On later in the course.
Technical Note
Use SSOCONN to specify one or more connect strings to use to connect to one or more data
sources in a single sign-on environment. For more information about SSOCONN, see Oracle
Application Server Report Services Publishing Reports to the Web.

Oracle Reports Developer 10g: Move to the Web 4-5

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Pluggable Data Sources

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 4-6

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

Using XML as a Data Source


XML enables business-to-business exchanges of data across applications and platforms.
Extensible Markup Language, or XML, is an open standard for describing data and is used for
defining data elements on a Web page and business-to-business documents. XML uses tags that
are similar to the tags used in HTML. However, whereas HTML is primarily used for formatting
and displaying text and images in a browser, XML is used for structuring data. XML enables the
exchange of data between applications in a simple, nonproprietary format.

Oracle Reports Developer 10g: Move to the Web 4-7

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using XML as a Data Source

Oracle Reports Developer 10g: Move to the Web 4-8

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using XML as a Data Source (continued)


To define an XML query:
1. Select XML Query on the Data Source page of the Report Wizard.
2. On the Data page, select Query Definition. The Define XML Query dialog box opens.
Specify information about your XML query:
- Data Definition: The data definition file is a list of elements contained in an XML
document that is used to validate the XML document. You can specify a Document
Type Definition file (DTD) or an XML schema file (XSD). A DTD supports
character data only, whereas an XSD supports other data types.
- Data Source: This is the location of the XML data stream that you want to use in
your report. It is often referred to as an XML document.

Copyright 2005, Oracle. All rights reserved.

Example: XML Data Stream


The Human Resources (HR) department is preparing for quarterly bonuses. Each manager has
submitted a percent increase for the employees in his group. HR has compiled a list of employee
ID numbers, the bonus amount, and the associated percentage. You are preparing the Employee
Compensation report and eventually must merge the data from HR with the employee data stored
in the corporate database.
In our example, the data provided by HR is stored in the file system in an XML document. An
XML data stream can also be accessed remotely through a URL. A subset of the data stream
from HR follows. In this example, the employee with ID 100 is receiving a $2,000 bonus, which
is 8% of his compensation.
<ROW>
<EMPID>100</EMPID>
<BONUS>2000</BONUS>
<PERINC>8</PERINC>
</ROW>

Oracle Reports Developer 10g: Move to the Web 4-9

Oracle University and DATACTIVA Consultoria y Servicios 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: XML Data Stream

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 Reports Developer 10g: Move to the Web 4-10

Oracle University and DATACTIVA Consultoria y Servicios 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: XML Data Stream (continued)


Document Type Definition

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 4-11

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 4-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

Report Bursting

Copyright 2005, Oracle. All rights reserved.

Bursting on a Repeating Group


For example, suppose you have created an employee salary report. You want to ensure that each
user receives only information that is relevant and appropriate for them. You can set up your
report so that the manager of Department 10 will receive an e-mail with the salary information
for employees in Department 10; the manager of Department 20 will be e-mailed the salary
information only for employees in Department 20, while a summary will be printed out for the
president of the company.
Example
The group report displayed in the slide generates salary information for employees in each
department. In order to distribute the salary information to each respective department manager,
you must set up the report to burst on the Department ID group.

Oracle Reports Developer 10g: Move to the Web 4-13

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Bursting on a Repeating Group

Setting the Repeat On property

Copyright 2005, Oracle. All rights reserved.

Bursting on a Repeating Group (continued)


To set up a report to burst on a repeating group:
1. Open your report in Reports Builder.
2. In the Object Navigator, select the outermost repeating frame.
As an alternative, you can use the Paper Layout view. Use the Object Navigator to locate
and select the outermost repeating frame. The repeating frame will then be selected in the
Paper Layout view.
Delete the repeating frame.
3. In the Object Navigator, select the Main Section node and invoke its Property Inspector.
4. Set the Repeat On property by selecting the repeating group on which the report will be
burst.
You are now able to distribute the data resulting from each section as an individual report.
Note: If you set the Repeat On property for more than one section of a report, all Repeat
On property values must be set to the same repeating group. If the Repeat On property for
any one of the Header, Main, and Trailer sections is set to a different data model break
group, Oracle Reports raises an error message.

Oracle Reports Developer 10g: Move to the Web 4-14

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Bursting on a Repeating Group

Copyright 2005, Oracle. All rights reserved.

Adding a Table of Contents to a Report


When you develop a large paper report, it is sometimes easier for your users to navigate through
the report if you include a table of contents. Using Reports Builder, you can generate a table of
contents that is displayed at the beginning of your paper report.
In prior releases, Oracle Reports formatted the sections of a report in sequential order: Header
section, followed by Main section, followed by Trailer section. In Oracle Reports 10g, you can
use the Format Order of Sections report property to specify the order in which the three
sections of a report are formatted. Reports Builder can format any section first to create
information that is known only at the time of formatting, such as page numbers, then use that
information in the formatting of a previous section.
For example, to create a table of contents (TOC) for a report, you can format the Main section
first and use report triggers to populate a table containing the TOC entries. When the first
element for the TOC is formatted, a trigger fires and creates a row in the TOC table containing
the TOC entry and the page number. After the Main section has completed formatting, the
format order setting can define that the Header section is formatted next. The Header section can
contain a report block based on the TOC table. After formatting, you can output your report with
a TOC (the Header section), followed by the report body (the Main section), followed by the
Trailer section.

Oracle Reports Developer 10g: Move to the Web 4-15

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Adding a Table of Contents to a Report

Use SRW.SET_FORMAT_ORDER in an After


Parameter Form trigger to format the Main section
of the report first.
Use SRW.GET_PAGE_NUM in a format trigger to
fetch the page number for each topic in the TOC.

Copyright 2005, Oracle. All rights reserved.

Another Option for Creating a Table of Contents


In addition to using the Format Order of Sections property to modify the order in which
Reports Builder formats the sections of the report, you can also use the
SRW.SET_FORMAT_ORDER built-in procedure to create a table of contents (TOC).
Using this procedure, you first format the Main section of the report, and then create report
triggers to build a table containing the TOC entries. When the first element for the TOC is
formatted, a trigger fires and creates a row in the TOC table containing the TOC entry and the
page number. After the Main section has completed formatting, the format order setting can
define that the Header section is formatted next. The Header section can contain a report block
based on the TOC table. After formatting, you can output your report with a TOC (the Header
section), followed by the report body (the Main section), followed by the Trailer section.

Oracle Reports Developer 10g: Move to the Web 4-16

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Another Option for Creating a


Table of Contents

Oracle Reports Developer 10g: Move to the Web 4-17

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating a Table of Contents (continued)


Example: You want to generate a report of your customer information. Your
customer database contains thousands of records. You want to group the customers by
country and then generate a table of contents so you can easily find the information for
the desired customer.
To create a simple table of contents:
1. Create a table in the database to hold the TOC information. You need two columns: one for
the topic (in this example, country name) and the other for the page number.
2. Use the Report Wizard to create a Group Above report. This report will display the country
name, then the customer names and customer e-mail addresses under each country name.
The table of contents you create will then be based on the country name in this report.
3. Create an After Parameter Form trigger that invokes the SRW.SET_FORMAT_ORDER
procedure to modify the default order of the report execution, so that the Main section is
formatted first.
FUNCTION AfterPForm RETURN BOOLEAN IS
BEGIN
SRW.SET_FORMAT_ORDER(SRW.MAIN_SECTION,
SRW.HEADER_SECTION, SRW.TRAILER_SECTION);
RETURN (TRUE);
END;
4. Create a format trigger on the field that displays the country name. The format trigger will
fetch the page number for each country name using SRW.GET_PAGE_NUM and insert the
country name along with the page number into the TOC table.
FUNCTION F_COUNTRY_NAMEFormatTrigger RETURN BOOLEAN IS
pageNum NUMBER;
BEGIN
-- get current page number
SRW.GET_PAGE_NUM(pageNum);
-- insert row into database table
INSERT INTO TOC_TABLE (TOPIC, PAGE_NUMBER)
VALUES (:country_name, pageNum);
RETURN (TRUE);
END;
5. Use the Data Model to create a second query that fetches the country name and the first and
last page on which that country information appears from the TOC table you created in
Step 1. Add a formula column to this query that concatenates the first page number and last
page number into a string depicting the page range for each country name.
6. Create a tabular report block in the Header section of your report that displays the TOC.
This will contain the country name and the page range where the countrys information can
be found in the report. Run the report to paper layout. The table of contents appears on the
first page of the report.

PDF features included in Oracle Reports:


Taxonomy
Accessibility
Compression
Font-related features
Graph support

Copyright 2005, Oracle. All rights reserved.

Using PDF in Oracle Reports


Portable document format (PDF) is a universal file format that preserves the fonts, formatting,
graphics, and color of the source document regardless of the application and platform used to
create it. Oracle Reports was one of the first report-generation tools to embrace this technology
and generate quality PDF documents.
Oracle Reports supports PDF 1.4 and is capable of generating high-fidelity PDF reports on all
platforms. The PDF features supported by Oracle Reports include:
Taxonomy: A PDF document can include global information about itself such as the
documents title, author, and creation and modification dates. This global information
proves useful at the time of cataloging or searching for documents in external databases.
Accessibility: Oracle Reports provides several ways for you to include accessibility
features in your PDF file. The PDF format file follows the tagged-PDF standard defined in
PDF 1.4. This standard, along with Acrobat Reader 5 (or higher), provides you with
features for inclusion in the paper layout.
Compression: PDF compression decreases the PDF file size, thereby reducing the time
spent in downloading the PDF file.

Oracle Reports Developer 10g: Move to the Web 4-18

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using PDF in Oracle Reports

Oracle Reports Developer 10g: Move to the Web 4-19

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using PDF in Oracle Reports (continued)


Font-related features:
- Font aliasing: Font aliasing enables you to substitute one font for another; that is,
font-to-font substitution. This font-to-font substitution is usually used when porting
applications (in this case, your PDF file) across platforms.
- Font subsetting: With font subsetting, the PDF file includes the font information
needed to render the PDF, regardless of the availability of that font on the machine
used to view the report. PDF font subsetting works for single byte, multibyte, and
Unicode fonts and is the preferred method of creating multibyte reports. PDF font
subsetting enhancements in Oracle Reports 10g Release 2 (10.1.2) generate PDF
documents with improved readability.
- Font embedding: PDF font embedding is the process of including the entire font set
along with the data in the PDF file. PDF font subsetting and font embedding are
mutually exclusive.
Graph support: Oracle Reports provides the capability to specify the dots per inch (DPI)
value for the image resolution of the graph in PDF output. This enables you to scale the
graph without compromising image quality.

Copyright 2005, Oracle. All rights reserved.

Setting PDF Document Taxonomy Properties


A PDF document can store properties that track general information, or metadata, about the
document itself. The metadata is intended to assist in cataloguing and searching the PDF
document.
Oracle Reports provides report-level properties that enable you to specify metadata about your
PDF report. The values that you specify for these properties are inserted into the PDF output file.
The properties are known as Document Taxonomy properties. They define the classification, or
taxonomy, for the document. The properties are:
Title: Specifies a title for the report, which you can use to identify the contents of a
document
Author: Specifies an author for the report, which may be an individual, company, or
department name
Subject: Specifies a subject for the report
Keywords: Specifies one or more keywords for the report that can be used to categorize
the document
Note: These properties are valid only for PDF output.

Oracle Reports Developer 10g: Move to the Web 4-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

Setting PDF Document


Taxonomy Properties

Screen reader
Visual
Hearing

Motor
Oracle Reportsgenerated PDF

Cognitive

Copyright 2005, Oracle. All rights reserved.

Making PDF Documents Accessible to the Disabled Community


Successful access to information by people with disabilities is known as accessibility. Oracle
Reports provides properties that allow you to create report output that can be read by assistive
technologies.
Property

Value

Alternative Text

Specifies text that displays in a pop-up window or can be


read by a screen reader as the cursor moves over an object in
report output

Headers

Cross-references the ID of the column heading for a


particular cell in a table. It is used with the ID property to
specify the headings associated with each data cell in a table.

ID

Specifies an ID for a column heading. It is used with the


Headers property to specify the headings associated with
each data cell in a table.

Oracle Reports Developer 10g: Move to the Web 4-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

Making PDF Documents Accessible to the


Disabled Community

Property

Value

Report Language

Specifies the language-territory information for the report.


This aids assistive technologies in changing elements such as
accent, pronunciation, and vocalization when the contents are
read by a screen reader.

Table Caption

Specifies a caption for a table in a report

For more information about Oracles accessibility program, see


http://www.oracle.com/accessibility.
For more information about accessibility in enterprise reporting using Oracle Reports, see the
white paper at http://www.oracle.com/accessibility/reports.html.

Oracle Reports Developer 10g: Move to the Web 4-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

Making PDF Documents Accessible to the Disabled Community (continued)

Copyright 2005, Oracle. All rights reserved.

Inline Formatting Using HTML Tags


Oracle Reports allows a variety of fonts, styles, and colors for text objects in your reports. You
can use SRW built-in procedures to change text attributes at run time. However, the changes are
applied to a whole text object, not to a portion of the text. In prior releases, if a column contained
rich text content, such as formatting instructions embedded within the text, this formatting was
not interpreted or applied in the report output. You could overcome this limitation by using
HTML tags for formatting and setting the objects Contains HTML Tags property to Yes. The
formatting could be seen only in HTML or HTMLCSS output; for reports generated to other
output formats (for example, PDF, RTF, and PostScript), the HTML tags themselves appeared in
the output.
Oracle Reports 10g introduces text formatting enhancements that allow you to use a defined set
of HTML formatting tags to format text style (bold, italic, underline, and strikethrough) and text
attributes (font name, font color, and font size), and generate formatted text objects in all bitmap
output formats supported by Oracle Reports.

Oracle Reports Developer 10g: Move to the Web 4-23

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Inline Formatting Using HTML Tags

The supported HTML tags are:


Tag
<b>, <strong>

Result

<i>, <em>

Italic

<u>

Underline

<s>, <strike>

Strikethrough

<span>

Generic style container used to specify font family, size,


and color attributes, as described in the table below

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

Specifies the size of the font

color

Specifies the color of the enclosing elements text content

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 Reports Developer 10g: Move to the Web 4-24

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Inline HTML Formatting (continued)


Oracle Reports supports HTML tags for the following objects:
Boilerplate text objects containing hard-coded HTML tags
Field objects that retrieve data from a table column containing HTML tags
File link object that points to a text file, which in turn contains HTML tags

Product_Name

Product_Description

Printer

Prints <b>100 copies</b> a minute

Digital Camera

Resolution <span style="color:red">2 Mpixels</span>

Copyright 2005, Oracle. All rights reserved.

Specifying Inline HTML Tags


Example: The Product Information table contains information about the products you sell, such
as the product ID, product name, production description, and price. To highlight specific text
within the product description, you can include HTML tags in the database column itself, as
shown in the slide.
In order to have the product descriptions formatted in your report, you must set the Contains
HTML Tags property for the Product_Description column to Yes. Oracle Reports then
formats the HTML tags contained in that column and display the enclosed text in the specified
format in your report output.
Note: If you specify the command line option CONTAINSHTMLTAGS=NO, Oracle Reports does
not interpret the HTML tags for the report, regardless of the objects setting for the Contains
HTML Tags property. For HTML and HTMLCSS output, the browser interprets the HTML
formatting tags; for other output formats, the HTML tags appear in the report output.

Oracle Reports Developer 10g: Move to the Web 4-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

Specifying Inline HTML Tags

Default style

User-defined style

Copyright 2005, Oracle. All rights reserved.

Using External Style Sheets in HTMLCSS Output


Every corporate Web site today uses style sheets to enforce the corporate look-and-feel across
Web pages. External style sheets are Cascading Style Sheet (CSS) files that are referenced by
these Web pages. End users typically want the same style used in pages on their Web site applied
to their Web reports.
In previous releases of Oracle Reports, if you wanted to apply user-defined styles and style
sheets to your reports, you had to manually edit the HTMLCSS output. In Oracle Reports 10g,
you can specify user-defined styles and style sheets for HTMLCSS output using Reports Builder.
You can apply styles to report, field, text, frame, and repeating frame objects using the new
properties Style Sheets, CSS Class Name, and CSS ID. The generated HTMLCSS output
includes links to the style sheets and the user-defined styles are applied to the objects.
Style Sheets is a report-level property and is used to attach an external style sheet to your report.
You can specify multiple style sheets separated by commas, new line, or tab space. When you set
this property to a style sheet name, which contains user-defined styles, you can then use the CSS
Class Name and CSS ID properties to specify the user-defined styles for your report objects.

Oracle Reports Developer 10g: Move to the Web 4-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

Using External Style Sheets

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 Class Name

Specifies the user-defined style to be applied to a report


or report object (frame, repeating frame, text boilerplate,
or field) when generating HTMLCSS output

CSS ID

Specifies the user-defined style to be applied to a text


object when generating HTMLCSS output

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 Reports Developer 10g: Move to the Web 4-27

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using External Style Sheets in HTMLCSS Output (continued)

Copyright 2005, Oracle. All rights reserved.

Embedding a Graph in a Report


Earlier in the course, you learned that Oracle Reports, like other Oracle products, uses
the BI Graph Bean for graph development. You use the Graph Wizard to easily produce a
graph for both your paper and Web reports.
In Reports Builder, you can invoke the Graph Wizard from the Paper Layout view and the
Paper Design view.
From the Paper Layout view:
1. Click the Graph tool in the vertical toolbar.
2. Drag a square in the painter area where you want your graph to appear. The Graph Wizard
appears.
3. Proceed through the wizard steps to create the desired graph and position it in your report.
From the Paper Design view:
1. Select Insert > Graph from the menu. The Graph Wizard appears.
2. Proceed through the wizard steps to create the desired graph and position it in your report.
To reenter the Graph Wizard, do either of the following:
Right-click and select Graph Wizard.
Click the graph and select Edit > Settings from the menu.

Oracle Reports Developer 10g: Move to the Web 4-28

Oracle University and DATACTIVA Consultoria y Servicios 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 a Graph in a Report

Copyright 2005, Oracle. All rights reserved.

Adding a Graph to the Web Layout


To add a graph to a Web report:
1. Open the Web Source view.
2. Position your cursor in the section of the source code where you want to add a graph.
3. Select Insert > Graph from the menu.
4. Proceed through the wizard steps to create the desired graph.
To reenter the Graph Wizard, position your cursor anywhere within the rw:graph tag and
select Edit > Settings.
You will learn more about the rw:graph tag later in this lesson.

Oracle Reports Developer 10g: Move to the Web 4-29

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Adding a Graph to the Web Layout

Copyright 2005, Oracle. All rights reserved.

Selecting the Graph Type and Graph Data


Graph type: The Graph Wizard provides a preview of each graph type, as well as
recommendations for using the different types of graphs. Select the graph subtype that you
require, using the subtype pictures as a guide.
Graph data: The Graph Wizard prompts you to define the x-axis and y-axis values for the
graph:
1. Select the field that you want to appear as the categories of your graph. Category columns
are used for the x-axis.
2. Select the field that you want to appear as the data values of your graph. Data values
columns are used for the y-axis and must be numeric.
Note: For graph types (such as Scatter/Bubble) in which each data point depicts two or more
values, you must select multiple data columns in the Data panel of the Graph Wizard.

Oracle Reports Developer 10g: Move to the Web 4-30

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Selecting the Graph Type and Data

Copyright 2005, Oracle. All rights reserved.

Adding Options to the Graph


The remaining pages in the Graph Wizard allow you to add optional characteristics to your
graph.
Use the Layout page to rearrange the data in a graph. The arrangement of data determines
the way a graph is displayed. On the Layout page, you can rearrange placeholders that
represent dimensions, such as Product, Time, Geography, and so on. When these changes
are applied, then actual dimension members are displayed in the positions that you
specified.
Use the Title page to specify text and font attributes for the title, subtitle, and footnote of a
graph.
Use the Legend page to select options for the legend of a graph. The legend area is a place
on a graph that provides a key to the information that is shown in the graph. It contains
legend markers, each corresponding to a series of data, and legend text, which describes the
data in that series. For example, you might have different cities represented by data
markers of different colors. Markers represent data on a graph. If red markers in your graph
represent New York, then there is a corresponding red legend marker in the legend area,
with legend text reading New York.

Oracle Reports Developer 10g: Move to the Web 4-31

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Adding Options to the Graph

Oracle Reports Developer 10g: Move to the Web 4-32

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Adding Options to the Graph (continued)


Use the X-Axis page to specify options for the x-axis of your graph. Options include the
text and font of the axis title, and axis line style and color. You can insert parameters into
the axis labels by clicking the Insert button and selecting the desired parameter. You can
also select the font of the x-axis labels.
Similarly, use the Y-Axis page to specify options for the y-axis of your graph.
Use the Plot Area page of the Graph Wizard to specify how the plot area of the graph
should be displayed. Options include background and border colors, gridlines, the line
color and style for gridlines, data lables, and data tips (tooltips displayed when the mouse is
moved over a bar, pie slice, and so on).
On the final page of the Graph Wizard, you can enter a hyperlink to link specific areas of
your graph to specific destinations. This feature is useful in creating drilldown reports.

<rw:graph id="graph" src="G_DEPARTMENT_ID"


groups="DEPARTMENT_ID"
dataValues="SALARY"
series="EMPLOYEE_ID,MANAGER_ID"
width="1200" height="600"
graphHyperlink="http://myhost.mycompany.com
/myexamples/emp.jsp?server=rep-server&
userid=hr/hr@orcl&destype=cache&
desformat=htmlcss&emp_id=&EMPLOYEE_ID;">

Graph XML
</rw:graph>

Copyright 2005, Oracle. All rights reserved.

Customizing Web Graphs


Earlier in the course, you learned how to customize your Web reports by editing the Web source
code and modifying the attributes for the Reports custom JSP tags. You can customize your Web
graphs by modifying the attributes of the rw:graph tag.

Oracle Reports Developer 10g: Move to the Web 4-33

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Web Graphs

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>

Copyright 2005, Oracle. All rights reserved.

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:

id: Unique identifier in the page scope

src: Name of the data source group

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

width: Width of the graph in pixels; optional

height: Height of the graph in pixels; optional

graphHyperlink: Defines a link to another source such as a URL or drilldown report;


optional

Oracle Reports Developer 10g: Move to the Web 4-34

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 4-35

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)

Copyright 2005, Oracle. All rights reserved.

Customizing Graphs Using the Graph.xml File


When you use the Graph Wizard to create a graph in the report layout, it generates
an XML file to store the attributes for the graph. This XML file is called Graph.xml. If
you want to define additional graph attributes beyond the ones exposed by the Graph
Wizard, you can edit the Graph.xml file manually, and Oracle Reports then uses
this edited Graph.xml to generate the graph in your report output.
To access Graph.xml in a paper report:
1. Invoke the Paper Layout.
2. Double-click the graph object to open the Property Inspector.
3. Click the button in the Graph Settings property to view and edit the Graph.xml file.
Note: For Web reports, Graph.xml is available directly in the rw:graph tag in the
Web source of the JSP.

Oracle Reports Developer 10g: Move to the Web 4-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

Customizing Graphs Using


the Graph.xml File

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 Reports Developer 10g: Move to the Web 4-37

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Customizing Graphs Using the Graph.XML File (continued)


Graph.DTD File
The list of all possible graph attributes is contained in a file called Graph.dtd. You can
locate this file in <oracle_home>\jlib\bigraphbean.jar. Use the WinZip utility
to unzip the contents of this JAR file. You can then use a text editor to view the Graph.DTD
file.

Paper layout
report

JSP Web report

Copyright 2005, Oracle. All rights reserved.

Using Graph Hyperlinks


Oracle Reports supports the ability to add a hyperlink to a graph embedded in a report. More
specifically, the hyperlink can be different for each section of the graph. For example, a user
may click on a particular slice of a pie graph, and drill down to another report to see detailed
information.
To add a hyperlink to a graph in a paper layout report:
Use the Property Inspector and specify the URL in the Graph Hyperlink property.
or
Use the Graph Wizard and specify the URL in the field on the Hyperlink panel.
To add a hyperlink to a graph in a JSP-based Web report:
In the Web Source view of your report, modify the rw:graph tag to include the
graphHyperlink attribute and specify a valid URL.
or
Use the Graph Wizard and specify the URL in the field on the Hyperlink panel.

Oracle Reports Developer 10g: Move to the Web 4-38

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using Graph Hyperlinks

A hyperlink to another report:


http://myserver.oracle.com:8888/reports/myexamples/
emp.jsp?server=repsrv1&userid=hr/hr@oraDB&
destype=cache&desformat=htmlcss&p_deptid=&<dept_id>
A hyperlink to any valid hyperlink destination:
http://www.oracle.com

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 Reports Developer 10g: Move to the Web 4-39

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using Graph Hyperlinks (continued)


Examples of valid hyperlinks:
A hyperlink to an object in the current report:
#&<dept_id>

Copyright 2005, Oracle. All rights reserved.

Creating a Reports JSP in Oracle JDeveloper


Oracle Reports is integrated with Oracle JDeveloper, enabling you to leverage the powerful
publishing capabilities of Oracle Reports within your Java applications. The integrated
development environment of Oracle JDeveloper enables you to model, develop, debug, optimize,
and deploy Java applications and Web services. You can leverage these features to build robust
JSP-based Web reports.
You can create a new JSP-based Web report or a pluggable destination from within Oracle
JDeveloper. The Reports JSP objects appear in the object gallery within Oracle JDeveloper. You
specify the report name, the Reports server, and your database connection information.
JDeveloper creates a skeletal JSP for you, including the taglib directive and the rw:report
tag. The rw:objects tag contains the XML for the data model and the layout. You can then
launch Reports Builder from within Oracle JDeveloper. After you create your report and exit
Reports Builder, control is returned back to Oracle JDeveloper. You also have the option of
manually coding the report.
Another integration feature is the running and debugging of an Oracle Reports JSP from within
Oracle JDeveloper. This allows you to set breakpoints, trace variable values, and determine logic
flow for the JSP. The Oracle Reports custom JSP tags appear within Oracle JDevelopers JSP tag
palette to facilitate easy report editing.

Oracle Reports Developer 10g: Move to the Web 4-40

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Creating a Reports JSP in JDeveloper

Copyright 2005, Oracle. All rights reserved.

Running a Reports JSP in Oracle JDeveloper


Oracle Reports Developer shares the same JSP/servlet engine as Oracle JDeveloper. This enables
you to run your JSP report directly from Oracle JDeveloper. The Run Project button starts the
JSP/servlet engine, which in turn invokes OracleAS Reports Services to execute the Reports
custom tags. The Reports server fetches the data and passes it to the JSP/servlet engine, where
the page is assembled and sent back to the browser. You view the executed JSP report (that is,
the Web layout) in your browser window.

Oracle Reports Developer 10g: Move to the Web 4-41

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports JSP in JDeveloper

Bridge between Reports and Java


PL/SQL wrappers generated for middle-tier Java

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 4-42

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

Importing a Java Class into Reports Builder


In Oracle Reports, the Java Importer is represented by the Import Java Classes dialog box that
provides you with a way to select or specify the Java classes you want to use in your report.
After you have selected the required Java classes, the Java Importer calls the PL/SQL generator
to create a PL/SQL package for each class you have selected. You can access the imported Java
through the generated PL/SQL using the ORA_JAVA built-in package. Internally, the generated
PL/SQL packages use the Java Native Interface (JNI) standard and an internal JNI package to act
as the bridge between PL/SQL and Java.
You can use this importer whenever you want to provide access to a Java class to your
application. The Java Importer can be run multiple times during a development session as new
Java class access requirements are discovered; it is not necessary to identify all the classes
needed at once.

Oracle Reports Developer 10g: Move to the Web 4-43

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Importing a Java Class

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 Reports Developer 10g: Move to the Web 4-44

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Importing a Java Class into Reports Builder (continued)


To import a Java class:
1. Ensure that the classes you want to import are specified in the REPORTS_CLASSPATH
environment variable; for example, e:\labs\demo\bonus.jar. You must restart
Reports Builder if it is already running.
2. Open the report or PL/SQL library where you want to place the generated PL/SQL
packages.
3. Select Program > Import Java Classes from the menu.
4. In the Select Java Classes area, select one or more Java class files.
5. Click Options to open the Import Java Classes Options dialog box to specify import
options.
6. In the Import Java Classes dialog box, click Import to start the import process.
7. When the import process is complete, click OK.

In this lesson, you should have learned how to:


Create a report based on XML as the data source
Burst a report on repeating data
Generate a table of contents
Identify the PDF 1.4 features in Reports Builder
Specify inline HTML tags in fields
Use external style sheets in HTMLCSS output
Create a graph using the Graph Wizard
Use the Java integration features of Reports
Builder: JDeveloper and Java Importer

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 4-45

Oracle University and DATACTIVA Consultoria y Servicios 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 Developer 10g: Move to the Web 4-46

Oracle University and DATACTIVA Consultoria y Servicios 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.

This practice covers the following topics:


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

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 4-47

Oracle University and DATACTIVA Consultoria y Servicios 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

at the end of the report

Category

sales_rep_id

Data

total_sales

Oracle Reports Developer 10g: Move to the Web 4-48

Oracle University and DATACTIVA Consultoria y Servicios 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

Order Total per Sales Rep

Graph Type

Horizontal Bar

Graph Subtype

Bar

b. Run the paper layout to test.


c. Save report as p4q4.jsp.
5. Continue with report p4q4.jsp.
a. Run the Web layout. What do you see?
b. Update the Web source with the correct column name.
c. Run the Web layout again to test.
d. Add a graph to the Web source. Position the graph at the beginning of the report.
Graph Type

Bar

Graph Subtype

Bar

Category

sales_rep_id

Data

total_sales

Title

Order Total per Sales Rep

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.
b. Create an After Parameter Form trigger to modify the default order of the report
execution, so that the Main section is formatted first.
c. Create a format trigger on the field that displays the warehouse name. The format
trigger should fetch the page number for each warehouse name and insert a
corresponding row into your TOC table. The code for the format trigger is provided
for you in the p4q6c.sql file.
d. Create another query in the data model with a formula column that calculates the
page range for the data under each warehouse name. The query will fetch the data
from your TOC table. The code for the query is provided for you in the
p4q6d1.sql file. The code for the formula column is provided for you in the
p4q6d2.sql file. Save your report.

Oracle Reports Developer 10g: Move to the Web 4-49

Oracle University and DATACTIVA Consultoria y Servicios 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

f. Run the paper layout.

Oracle Reports Developer 10g: Move to the Web 4-50

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Deploying Reports Using


OracleAS Reports Services

After completing this lesson, you should be able to do


the following:
Describe OracleAS Reports Services architecture
Distinguish between the JSP and servlet run-time
architectures
Describe the various ways to run a report
Use the plug-in interface to extend Oracle Reports
functionality
List the options for managing and monitoring
OracleAS Reports Services
Describe how report applications and resources
are secured using OracleAS Single Sign-On
Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 5-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

Objectives

Provides the deployment platform for Web and


non-Web environments
Enables running of reports on any platform using
a standard URL
Maintains a job queue to store client requests
Caches report output
Enables you to use database events to trigger
report generation
Provides comprehensive security through Oracle
Single Sign-On
Integrates with Oracle Enterprise Manager for
monitoring and managing reports jobs
Copyright 2005, Oracle. All rights reserved.

Running Reports Using OracleAS Reports Services


OracleAS Reports Services, a component of Oracle Application Server, is an enterprise reporting
service for producing high-quality production reports. OracleAS Reports Services enables you to
dynamically retrieve, format, and distribute any data, in any format, anywhere. You can use
OracleAS Reports Services to publish in both Web-based and non-Web-based environments.
OracleAS Reports Services provides a scalable, flexible deployment platform for the distribution
and automated management of report generation engines on the same server and across multiple
servers. You can also implement a multitier architecture that enables you to run your reports on
both local and remote application servers. OracleAS Reports Services provides:
Web integration: When used in conjunction with JSPs, Java servlets, Web Services, or
CGI (maintained for backward compatibility), OracleAS Reports Services enables you to
run reports on any platform from a Web browser using a standard URL syntax. For servlet
implementations, OracleAS Reports Services provides the in-process server for faster
response and easier administration. The Reports Server can be executed as a stand-alone
process or in-process with the servlet for ease of maintenance.

Oracle Reports Developer 10g: Move to the Web 5-3

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Using


OracleAS Reports Services

Oracle Reports Developer 10g: Move to the Web 5-4

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Using OracleAS Reports Services (continued)


Automatic Reports engine management: OracleAS Reports Services handles client
requests to run reports by entering all requests into a job queue. When one of the servers
engines becomes available, the next job in the queue is dispatched to run. As the number of
jobs in the queue increases, the server can start more engines until it reaches the maximum
limit that you specify in your server configuration. Similarly, engines are shut down
automatically if they are idle for a specified period of time.
Caching and job persistence: With OracleAS Reports Services, job information is
persistent for a period of time to optimize resource usage. This means that the information
in the queue is persisted even if the server is shut down for maintenance. All jobs are
available the next time the Reports Server starts and the processing of the queue begins. In
addition, OracleAS Reports Services caches report output for reuse on similar requests.
Therefore, users can share output without rerunning the report.
Event-based reporting: OracleAS Reports Services enables you to use database events to
trigger the generation of your report. For example, you can define an event that signals a
change in revenue levels above or below a particular watermark. If the change occurs in the
database (the event), a report is automatically generated.
Oracle Enterprise Manager integration: The OracleAS Reports Services pages in Oracle
Enterprise Manager enable you to manage the Reports Server. You can monitor and
manage the queues, start, stop, and restart a server, configure server and engine parameters,
access trace and log files, and view real-time performance data.
OracleAS Single Sign-On and Reports security: OracleAS Reports Services integrates
with Oracle Application Server Single Sign-On (SSO) to provide:
- Application security for controlling access to the report application where users
launch report requests
- Resource security for controlling access to reports, printers, calendars, and Reports
Servers
- Data source security for controlling access to a particular database for user
authentication
High availability through Oracle Application Server clustering: Oracle Application
Server supports clustering to enable high availability for the various Oracle Application
Server components. This feature eliminates the possibility of a single point of failure and
supports a fail-safe environment if any of the individual components, such as OracleAS
Reports Services, fail.

Business

Integration

Intelligence

Broker

Application server
Grid Computing Infrastructure

Management

Portal

Web
Services

Oracle Application Server 10g


Business
Intelligence

Any data
source

Packaged
application

B2B

Copyright 2005, Oracle. All rights reserved.

OracleAS Reports Services Architecture


OracleAS Reports Services is designed to publish reports in both Web-based and non-Web-based
environments. Reports Services can be configured in a number of ways depending on your
requirements. In this section, you learn about the OracleAS Reports Services run-time
architecture and the various commands used to invoke a report that is deployed on the Oracle
Application Server.

Oracle Reports Developer 10g: Move to the Web 5-5

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Mobile and
Wireless

Application Development Framework


Security and Identity

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 Application Server Components

Oracle Reports Developer 10g: Move to the Web 5-6

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Services Architecture (continued)


First, you should be familiar with the key components of an OracleAS Reports Services
environment:
The OracleAS HTTP Server is a Web server. It incorporates an OpenSSL module to
provide support for Secure Sockets Layer (SSL) and HTTP Secure Sockets Layer
(HTTPS). It also provides a servlet engine to support the running of Java servlet
applications.
The mod_OC4J module is used by the HTTP Server to redirect requests for servlets and
JSPs to OracleAS Containers for Java 2 Enterprise Edition (OC4J). OC4J provides a fast,
lightweight, highly scalable, easy-to-use complete J2EE environment that includes a JSP
translator, a JSP servlet engine, and an Enterprise JavaBeans (EJB) container.
The Reports Servlet runs inside the Web servers servlet engine. The Reports Servlet
translates and delivers information between HTTP and the Reports Server. It includes the
In-process Server, which reduces the maintenance and administration of the Reports Server
by providing a means for starting the server automatically, whenever it receives the first
request from the client through the Reports servlet (rwservlet) or a Reports JSP.
The Custom Tag Handler processes custom Oracle Reports tags included in a JSP file. In
a JSP file, Oracle Reports-related custom tags are identified by the rw: prefix; other
custom tags using other prefixes may also be present.
The Reports CGI translates and delivers information between either a Web server or a
J2EE container (for example, OC4J) and the Reports Server. This component enables you
to run a report dynamically from your Web browser.
Note: Reports CGI is provided only for backward compatibility.
The Reports Server processes client requests. It spawns run-time engines, fetches
completed reports from the Reports cache, and notifies the client that the report is ready.
The Reports Engine includes components for running SQL- and PDS-based reports. It
fetches requested data from the data source, formats the reports, generates the output, sends
the output to cache, and notifies the Reports Server that the job is complete.
The Reports Server Cache stores completed jobs.
When used in a Web environment, the OracleAS Reports Services architecture consists of four
tiers:
The client tier (a Web browser)
The Web server tier
The OracleAS Reports Services tier
The data tier, including databases and pluggable data sources
When used in a non-Web environment, there are three tiers (a Web server being unnecessary):
The client tier
The OracleAS Reports Services tier
The data tier

HTTP
Oracle HTTP Listener
mod_OC4J
rept.jsp
OID

JSP Engine
CORBA/IIOP
OracleAS
Reports Services

CORBA/IIOP
Reports
Engine
PDS

Copyright 2005, Oracle. All rights reserved.

Running the Web Layout: JSP Run-Time Architecture


You use the JSP run-time architecture to run the Web layout.
As you learned earlier in the course, you use JSPs to dynamically generate Web content using
Java scriptlets, declarations, and expressions in a Web page. You can also interleave this with
static Web content generated using a markup language, such as HTML, XML, and Wireless
Markup Language (WML).
The JSP engine executes the JSP, and the Reports custom JSP tags invoke the Reports Server to
ensure that the user is authenticated to run the report. After authentication has been established,
the Reports Server spawns a Reports engine and sends the request to that engine. The Reports
engine retrieves the data from the specified data sources and passes it to the JSP engine. The JSP
engine formats the data and returns it to the user. The communication between the JSP engine,
the OracleAS Reports Server, and the Reports engine is done through industry standards,
Common Object Request Broker Architecture (CORBA) and Internet Inter-ORB Protocol
(IIOP).

Oracle Reports Developer 10g: Move to the Web 5-7

Oracle University and DATACTIVA Consultoria y Servicios 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 the Web Layout:


JSP Run-Time Architecture

HTTP
Oracle HTTP Listener
mod_OC4J
Reports Servlet

Fax

CORBA/IIOP

OID

OracleAS Reports Services

int
Pr

Ma
il

CORBA/IIOP
rept.rdf
rept.jsp

Reports
Engine
PDS

Copyright 2005, Oracle. All rights reserved.

Running the Paper Layout: Servlet Run-Time Architecture


You use the servlet run-time architecture to run the paper layout.
When a request is received for the Reports servlet, the servlet contacts the Reports Server to
ensure the user is authenticated to run the report. After authentication has been established, the
Reports Server spawns a Reports engine and sends the request to that engine to run the report.
The Reports engine executes the RDF by retrieving and formatting the data, populating the
Reports cache, and notifying the Reports Server that the report is ready.
The Reports Server accesses the cache and sends the report to the specified destination. You can
configure the servlet to use the in-process server, which enables faster communication because
the servlet and in-process Reports Server are executing within the same process. An added
advantage is that the servlet starts and stops the in-process server automatically.
If the report is a Reports JSP that contains a paper layout, the Reports engine interprets the paper
layout, coded in XML, and executes the report as stated above.

Oracle Reports Developer 10g: Move to the Web 5-8

Oracle University and DATACTIVA Consultoria y Servicios 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 the Paper Layout:


Servlet Run-Time Architecture

HTTP URL
RWCLIENT command line
OracleAS Portal
SRW.RUN_REPORT

Web service
Event-Driven Publishing API

Copyright 2005, Oracle. All rights reserved.

Report Request Methods


You can run a report using various request methods:
HTTP URL: To run a report from a Web browser, use an HTTP URL. The Reports servlet
(and CGI, for backward compatibility) converts the URL syntax into an rwclient command
line request, which is then processed by the Reports Server. 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.
The RWCLIENT command: This command enables you to run a report from the command
line prompt in a non-Web environment. RWCLIENT is an executable that parses and
transfers the command line to the specified Reports Server. It can use command line
arguments similar to those used with the OracleAS Reports Runtime executable file,
RWRUN.
OracleAS Portal: 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. Each
report link points to a packaged procedure that contains information about the report
request. OracleAS Reports Services system administrators use OracleAS Portal wizards to
create the packaged procedure, making it more convenient and secure to publish the report
through the Web. Authorized users accessing the OracleAS Portal page group simply click
the link to run the report. System administrators can run the report directly from the wizard.
Oracle Reports Developer 10g: Move to the Web 5-9

Oracle University and DATACTIVA Consultoria y Servicios 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 Request Methods

Oracle Reports Developer 10g: Move to the Web 5-10

Oracle University and DATACTIVA Consultoria y Servicios 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 Request Methods (continued)

SRW.RUN_REPORT: This built-in procedure submits a report to Reports Services. In the


argument list, you specify the JSP or servlet information in addition to the Reports
parameters, and RUN_REPORT sends the request to Reports Services. Set the SERVER
argument to the OracleAS Reports Services server name to cause the SRW.RUN_REPORT
command to behave as though you executed the RWCLIENT command.
Web service: You can expose OracleAS Reports Services as a Web service and then call it
from any Web service aware environment (for example, a Java application).
Event-Driven Publishing API: The Event-Driven Publishing API is a PL/SQL package
that allows for the automatic submission of jobs to OracleAS Reports Services from within
the database. The API provides the basic functions required for the development of
procedures that respond to events in the database. With event-driven publishing, you can
automatically run a report in response to a database event, such as the insertion of a record
or the change of a value. Event-driven jobs are submitted using the HTTP protocol. The
server assigns a unique job identifier to every call, which is useful for tracking the status of
the job. The Event-Driven Publishing API is a PL/SQL API.

Select the deployment method based on the report


type:
Report Type

Method

Report definition with

Deploying a report with a

paper layout only (REP,

paper layout

RDF, XML, JSP)


JSP with paper and Web

Deploying a JSP report to the

layout; JSP with Web

Web and paper

layout only

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 5-11

Oracle University and DATACTIVA Consultoria y Servicios 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

Transfer the report file and its associated files to


the deployment directory of your application
server.
Ensure this directory is part of the REPORTS_PATH
environment variable.

Copyright 2005, Oracle. All rights reserved.

Deploying a Report with a Paper Layout


To deploy a report with a paper layout:
1. Transfer the report file (RDF, REP, XML, or JSP) and its associated files (for example,
PLL, PLX, or referenced images) to the deployment directory on your application server.
To transfer the file, you can use any method available, such as FTP or WebDAV. For FTP
transfers, use binary mode for RDF and REP files, and ASCII mode for XML and JSP files.
2. Ensure the directory on the application server where you have transferred the file is listed
in the Reports Server access path. If it is not, use the REPORTS_PATH environment
variable, or set the sourceDir property of the Reports engine element in the server
configuration file.

Oracle Reports Developer 10g: Move to the Web 5-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

Deploying a Report with a Paper Layout

URL for an RDF:


http://newton.world.com:7778/reports/rwservlet?
report=emp_dept.rdf&userid=username/pwd@ORCL&
destype=cache&desformat=PDF&
server=repsrv1&p_deptno=10

URL for a JSP:


http://newton.world.com:7778/reports/rwservlet?
report=emp_dept.jsp&userid=username/pwd@ORCL&
destype=cache&desformat=HTML&
server=repsrv1&p_deptno=10
Copyright 2005, Oracle. All rights reserved.

Running a Paper Report


Now that you have deployed your paper report, you can run it from a Web browser.
Thanks to the Reports thin client Web interfaces (the Reports servlet or JSP), running a report on
the Web is simply a matter of entering a URL, just as you would fetch almost any document on
the Web. The URL specifies all the required information to run the report, such as: what report to
run, what format to produce the output in, what parameters to pass, whether to schedule the
report, and so on. Consider the following example:
http://newton.world.com:8888/reports/rwservlet?
report=emp_dept.rdf&userid=user1/user123@OraDB&
destype=cache&desformat=PDF&server=repsrv1&p_deptno=10
In the example, the first line contains the Web server host name (newton), the domain name
(world), the port (8888), and the alias (reports), a virtual path that stands in for the
absolute path to the files the URL will access. rwservlet invokes the OracleAS Reports
Services servlet. The question mark (?) identifies the beginning of the command line arguments,
such as the module name, destination format, destination type, Reports Server name, and a value
for a run-time parameter. The ampersand (&) concatenates all the command line parameters and
constructs a single string.
Note: You can also use a plus sign (+) to concatenate the command line parameters.

Oracle Reports Developer 10g: Move to the Web 5-13

Oracle University and DATACTIVA Consultoria y Servicios 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 Paper Report

Use an existing Oracle Reports application.


Create your own J2EE application.

Copyright 2005, Oracle. All rights reserved.

Deploying a Report with a Web Layout


There are two ways you can deploy a JSP report: through the existing Oracle Reports
application, or through a J2EE application you create yourself. Using an existing application is
useful when you are developing and testing your JSP-based Web reports. When you are ready to
deploy your reports in a production environment, it is recommended that you use your own J2EE
application.
To use the existing application, you must transfer your report file and its associated files to
<oracle_home>/J2ee/OC4J_BI_Forms/applications/reports/web.
Note: <oracle_home> refers to the directory where Oracle Application Server is installed.
To create a new J2EE application for Oracle Reports, you would create a Web application
archive (WAR file) that contains the application information, and then deploy it as an Enterprise
archive (EAR file). You can use Oracle JDeveloper or another Java development tool to create a
J2EE application, or you can create it manually.
Technical Note
To learn more about creating a J2EE application, refer to Sun Microsystems Web site
(http://java.sun.com/j2ee). For more information on using Oracle JDeveloper, refer to the Oracle
JDeveloper online help. Also see the Running Report Requests chapter in Oracle Application
Server Reports Services Publishing Reports to the Web 10g.
Oracle Reports Developer 10g: Move to the Web 5-14

Oracle University and DATACTIVA Consultoria y Servicios 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 with a Web Layout

URL for a JSP launched from an existing application:


http://appsvr.world.com:80/reports/emp_dept.jsp?
userid=username/pwd@ORCL&server=repsrv1&p_deptno=10

URL for a JSP launched from your J2EE application:


http://appsvr.world.com:80/MyJSPApp/MyWebRpt/
emp_dept.jsp?userid=username/pwd@ORCL&
server=repsrv1&p_deptno=10

Copyright 2005, Oracle. All rights reserved.

Running a Web Report


To run your JSP-based Web report from a browser, enter the URL in the Address or Location
field.
If you are running your report from an existing Oracle Reports application, your URL will be of
the format:
http://machine_name:port/reports/reportname.jsp?
userid=username/password@database_name/server=server_name
If you are running your report from your own J2EE application, your URL will be of the format:
http://machine_name:port/MyReportApp/reportname.jsp?
userid=username/password@database_name
Note: MyReportApp is the name of your J2EE application. This application can have its own
directory structure, as illustrated in the second example in the slide.

Oracle Reports Developer 10g: Move to the Web 5-15

Oracle University and DATACTIVA Consultoria y Servicios 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 Web Report

Key mapping is useful for:


Simplifying a URL
Remapping run-time commands
Standardizing typical run configurations
Hiding parameters
Restricting parameters
http://appsvr.world.com:80/MyJSPApp/MyWebRpt/
emp_dept.jsp?cmdkey=emp_key&10

Copyright 2005, Oracle. All rights reserved.

Using a Key Map File


You may have noticed from the examples for running a paper report and a Web report that the
URL can become quite long. To avoid this problem, you can use the key map file
cgicmd.dat.
The key map file contains command strings for running reports, each headed by a unique key
identifier. Except when you run a JSP, you reference only this key in the run-time URL. When
you run a JSP, you must use the cmdkey keyword in the URL. The server or servlet sends the
key value to the map file (cgicmd.dat), which in turn returns the command associated with
the specified key to the server or servlet for processing. By using key mapping, the command
line options are all hidden from the user. Key mapping is useful for:
Simplifying a URL and making it more convenient to use
Remapping run-time commands without having to change the original URL
Standardizing several typical run configurations for your organization
Hiding certain parameters from the end userfor example, the database connect string
Restricting parameters that users can use to run a report

Oracle Reports Developer 10g: Move to the Web 5-16

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using a Key Map File

Note that the delimiter in the map file entry is a space.


The new URL is:
http://appsvr.world.com:80/MyJSPApp/MyWebRpt/emp_dept.jsp?
cmdkey=emp_key&10
Technical Note
The key map file is loaded when the OC4J instance is started. To reload the file after you modify
the key map, do one of the following:
Restart the OC4J instance using Oracle Enterprise Manager.
Edit the <oracle_home>/reports/conf/rwservlet.properties file and set
the RELOAD_KEYMAP parameter to YES. If your OC4J instance is already running, you
must restart it this one time. With this parameter set, the file will be automatically reloaded
each time it is modified.

Oracle Reports Developer 10g: Move to the Web 5-17

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using a Key Map File (continued)


By default, the key map file is located in the <oracle_home>/reports/conf directory.
For the Web report (JSP) on the previous page, the key mapping entry may look like the
following:
emp_key: report=emp_dept server=repsvr1 p_deptno=%1

OracleAS
OracleAS
Reports
Reports
Services
Services

Destinations
Engines
Notifications
Cache management
Data sources

Copyright 2005, Oracle. All rights reserved.

Extending Oracle Reports Functionality Using Plug-ins


No matter how powerful and flexible a reporting tool might be, it cannot fit every users specific
requirements. Keeping this in mind, Oracle Reports provides you with well-documented Java
APIs with which you can extend and customize Oracle Reports to satisfy all your unique needs.
The Oracle Reports Java APIs help you to define your own plug-ins for data sources, output
destinations, security infrastructure, cache management, engines, and notifications.
Security infrastructure: OracleAS Reports Services enables you to plug in any security
you want, using the provided API. For example, you can use the security API to integrate
your own XML-based security model with the Reports Server.

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 Reports Developer 10g: Move to the Web 5-18

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

Extending Oracle Reports Functionality


Using Plug-ins

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 Reports Developer 10g: Move to the Web 5-19

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Extending Oracle Reports Functionality Using Plug-ins (continued)


Engines: By plugging in new engines, you can transform the Reports Server into an allpurpose server environment. For example, you could create an engine that executes any
specified operating system command. By plugging this engine into your Reports Server,
you can leverage all the other server features, such as scheduling, security, distribution,
notification and cache management. You only have to address the immediate logic required
for your specific task.
Notifications: If you are the administrator of OracleAS Reports Services, you want to track
server activity and monitor the success and failure of server jobs. OracleAS Reports
Services enables you to set up notifications, so that you are notified when a job finishes on
the Reports Server. You can use default notification that is provided with OracleAS
Reports Services, or plug in any type of notification you want using the notification API.
For example, if a job fails, you can have a notification sent to your wireless device.
Cache management: You can use the pluggable caching API to integrate your customized
caching algorithm.
Data sources: As you have learned earlier in the course, you can also write your own data
source mechanism using an open Java API if the out-of-the-box PDS options do not suit
your needs.

ACLs in OracleAS Portal

Security

Browser, printer, e-mail, file,


FTP, OracleAS Portal, WebDAV

Destinations
Engines

URL Engine

Notifications

E-mail

Cache management

First in, first out size-based


cache
Express, JDBC, OLAP, SQL,
Text, XML

Data sources

Copyright 2005, Oracle. All rights reserved.

Out-of-the-Box Implementations in Oracle Reports


Oracle Reports provides out-of-the-box implementations for each plug-in component:
Plug-in component

Implementation available in Oracle Reports

Security

Access Control Lists (ACLs) in OracleAS Portal

Destinations

Browser, e-mail, printer, WebDAV, FTP, OracleAS Portal

Engines

Reports engine (rwEngine), URL engine

Notifications

E-mail

Cache Management

First in, first out (FIFO) policy

Data Sources

Express Server Query, JDBC Query, OLAP Query, SQL


Query, Text Query, XML Query

Oracle Reports Developer 10g: Move to the Web 5-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

Out-of-the-Box Implementations in
Oracle Reports

ENVID=AR

ENVID=AR

Reports
engine 1
ENVID=ZHT

Reports
Server

ENVID=ZHT

Reports
engine 2

Copyright 2005, Oracle. All rights reserved.

Dynamic Environment Switching


In previous Oracle Reports releases, the Reports Server could serve only reports that were
compatible with the environment in which you started the Reports Server. For example, to run
your report in a particular language, you were required to start the Reports Server with a
compatible NLS_LANG parameter value. This restriction meant that you needed to have one
Reports Server running for each language you wanted to process. Oracle Reports 10g includes a
feature called dynamic environment switching. Dynamic environment switching enables you to
dynamically change the environment after a Reports Server is started, or for a specific job
request. This means that one instance of Reports Server can serve reports with any arbitrary
environment settings, such as language, currency, and display settings. You do not need to
maintain a unique instance of Reports Server for each language.
To enable dynamic environment switching, you must first add an environment element to your
Reports Server configuration file to establish a particular run-time environment. After you have
an environment element established, you can switch to its settings in either of the following
ways:
Set the value of the defaultEnvId attribute of the engine element in the Reports Server
configuration file to the id of the environment element, to apply the environment settings
to that engine when it starts up. The Reports Server starts engines initially with the default
environment settings specified by the defaultEnvId attribute of the engine element in
the Reports Server configuration file.
Oracle Reports Developer 10g: Move to the Web 5-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

Dynamic Environment Switching

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

Dynamic Environment Switching (continued)

Printer

DISPLAY

Reports
Server

Copyright 2005, Oracle. All rights reserved.

Removing the DISPLAY and Printer Dependencies on UNIX


In previous releases of Oracle Reports, you had to set the DISPLAY environment variable in
order for Reports Server to use the windowing system display surface for creating images and
getting pixel resolution. This dependency is removed in Oracle Reports 10g.
In addition, earlier releases required a valid printer on UNIX for font display. When no valid
printer was available, OracleAS Report Services used the screen fonts, which again required the
DISPLAY variable mentioned above. Now OracleAS Report Services includes a default screen
printer driver, ScreenPrinter (screenprinter.ppd), that provides surface resolution for
images and specifies font information. This PostScript driver emulates a screen or printer for
fonts in the absence of an available printer. Therefore, in Oracle Reports 10g, you do not need a
printer to run your reports on UNIX.
By default, the environment variable REPORTS_DEFAULT_DISPLAY is set to YES, which
specifies that OracleAS Reports Services will:
Not require the DISPLAY environment variable
Use ScreenPrinter for surface resolution for images and font information

Oracle Reports Developer 10g: Move to the Web 5-23

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Removing the DISPLAY and Printer


Dependencies on UNIX

opmn.xml

addNewServerTarget.bat
Targets.xml

Copyright 2005, Oracle. All rights reserved.

Configuring Reports Servers


The best way to start, shut down, monitor, and manage the Reports Server is through the Oracle
Process Manager and Notification Server (OPMN) and Oracle Enterprise Manager. OPMN
provides a centralized mechanism for initializing, maintaining, and shutting down your Oracle
Application Server components, including the Reports Server. Oracle Enterprise Manager is a
browser-based tool that enables you to conveniently manage and monitor all the components of
Oracle Application Server, including OracleAS Reports Services.
During installation of Oracle Application Server, Reports Servers are automatically configured
in OPMN and registered with Oracle Enterprise Manager. To add a Reports Server after
installing Oracle Application Server, you can run the addNewServerTarget.bat script on
the command line:
<oracle_home>\bin\addNewServerTarget.bat reports_server_name
This command will register the new servers in two locations:
The Oracle Process Manager and Notification Servers opmn.xml file located in
<oracle_home>\opmn\bin
The Oracle Enterprise Managers targets.xml file located in
<oracle_home>\sysman\emd
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-24

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Configuring Reports Servers

Using Oracle Enterprise Manager:


Start, stop, and restart a Reports Server
View and manage report job queues
Monitor server performance
Edit server configuration

Copyright 2005, Oracle. All rights reserved.

Managing and Monitoring OracleAS Reports Services


Oracle Enterprise Manager is the single, integrated solution for administering and monitoring all
the components of Oracle Application Server. Because OracleAS Reports Services is integrated
with Oracle Enterprise Manager, you can manage OracleAS Reports Services through the
browser-based user interface of Oracle Enterprise Manager 10g Application Server Control. The
Oracle Enterprise Manager 10g Application Server Control provides both administration and
real-time performance monitoring functions for your Reports Server. You can:
Start and stop your Reports Server
Monitor server performance and engine status
View and edit Reports Server configuration files
View the Reports Server trace and log files
View and manage the reports job queues, that is, scheduled, current, failed, and completed
jobs
Terminate running, hung, or idle engines
Monitor engine parameters (for example, engine name and status, process ID, current job
ID, job execution time, engine life) as well as view engine trace information
View a list of components upon which OracleAS Reports Services depends, along with the
status of each component

Oracle Reports Developer 10g: Move to the Web 5-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

Managing and Monitoring


OracleAS Reports Services

Copyright 2005, Oracle. All rights reserved.

Managing and Monitoring OracleAS Reports Services (continued)


To monitor Reports Services using Oracle Enterprise Manager:
1. Open a browser window and enter a URL in the following format:
http://AppServer.com:18100
2. Log in using the administrator username and password: ias_admin/welcome1.
3. Click on the link for your application server instance to navigate to its home page.
Information about the system components displays.
4. Click the link for the Reports Server to display its components and status, job status, and so
on.

Oracle Reports Developer 10g: Move to the Web 5-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

Managing and Monitoring


OracleAS Reports Services

OracleAS Reports Services includes functionality for:


Application security
Resource security
Data source security

Copyright 2005, Oracle. All rights reserved.

Securing OracleAS Reports Services


The openness of the Internet brings with it concerns about controlling who has access to what
confidential company information. OracleAS Reports Services provides several security options
that enable you to ensure that the appropriate users are getting important data in a secure way.
OracleAS Reports Services provides functionality for three main areas of security:
Application security: Controlling access to the report application from which users launch
their report requests
Resource security: Controlling access to reports, printers, calendars, and Reports Servers
Data source security: Controlling access to a particular database
Application Security
Users often must log in to an application or site from which they can access and run their reports.
This launcher application is typically protected by some sort of login facility, such as OracleAS
Single Sign-On. After they successfully gain entry into the launcher application, resource
security takes over and determines which reports and destinations a given user or group may
request. OracleAS Single Sign-On provides a single point of user login and, optionally, data
source security. In a typical configuration, the user would log in through OracleAS Single SignOn to gain access to a report application, where they would access and run their reports.

Oracle Reports Developer 10g: Move to the Web 5-27

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Securing OracleAS Reports Services

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 Reports Developer 10g: Move to the Web 5-28

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Securing OracleAS Reports Services (continued)


Resource Security

http://newton.world.com:7778/reports/rwservlet?
report=emp_dept.rdf&server=repsrv1&destype=cache
&ssoconn=mykey/OracleDB/userid&desformat=html

mykey is a connection string value stored in the


Oracle Internet Directory.
OracleDB is the data source type.
userid is the Oracle Reports system or user
parameter used to pass the connection string to
Oracle Reports.

Copyright 2005, Oracle. All rights reserved.

Configuring OracleAS Single Sign-On for Oracle Reports


By default, the Reports Server is secured and, to run a report, you must log in with a valid single
sign-on user ID and password. The Reports Server is configured by default with the OracleAS
Single Sign-On instance installed as part of Oracle Application Server. The Oracle Internet
Directory instance installed with Oracle Application Server is used as the default repository for
user and group information.
Enabling and Disabling OracleAS Single Sign-On
To take advantage of OracleAS Single Sign-On out-of-the-box, the SINGLESIGNON parameter
in the Reports Servlet configuration file (rwservlet.properties) is set to YES, which
indicates that you will use OracleAS Single Sign-On to authenticate users.
You can change this parameter to NO if you do not want to use OracleAS Single Sign-On. If you
choose NO, the Reports Server authenticates users by itself. The rwservlet configuration file
is located in <oracle_home>\reports\conf.
Note: The SINGLESIGNON value is usually commented out after installation, but the default
value is YES. Furthermore, OracleAS Reports Services is configured for OracleAS Single SignOn out-of-the-box. Oracle considers this to be the normal security deployment model, and you
should turn it off only if you plan to run in a completely customized security configuration.

Oracle Reports Developer 10g: Move to the Web 5-29

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Configuring Single Sign-On


for Oracle Reports

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)

conn_string_parameter specifies the Oracle Reports system or user parameter to be


used to pass the connection string to rwservlet to run the report. For example, in the
case of the OracleDB data source, Oracle Reports receives the connection string through
the USERID parameter and uses it to connect to the specified Oracle database.
For more information on OracleAS Single Sign-On, refer to the Oracle Application Server
Reports Services Publishing Reports to the Web manual.

Oracle Reports Developer 10g: Move to the Web 5-30

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Configuring Single Sign-On for Oracle Reports (continued)


Enabling and Disabling Reports Server Security

User requests a report through a URL.


Oracle HTTP Server routes request to rwservlet.

rwservlet asks OracleAS SSO to authenticate user.


User is prompted for username and password.
OracleAS SSO verifies user credentials
with OID.

Copyright 2005, Oracle. All rights reserved.

Handling Report Requests with OracleAS Single Sign-On


OracleAS Single Sign-On makes use of an encrypted cookie to track authenticated application
users. When the rwservlet receives a request to execute a report on a secured Reports Server, it
queries the Oracle HTTP Server to determine whether the user has already logged on through
OracleAS Single Sign-On (that is, a single sign-on cookie exists for the user):
If the user has logged on already (that is, the cookie exists), then rwservlet gets the
user's identity from the Oracle HTTP Server.
If the user has not logged on already (that is, if the cookie does not exist yet), then the
Oracle HTTP Server redirects the user to OracleAS Single Sign-On, which prompts the
user to log in. After the user is authenticated, the single sign-on cookie is created and the
user is redirected back to rwservlet.
To understand how a report request is processed, consider this scenario:
1. A user requests a report through a URL by clicking a link on a Web page.
2. The Oracle HTTP Server routes the request to the rwservlet deployed on OC4J. The
URL redirects the user to either the rwservlet or the JSP depending on whether this
report has been set to execute through rwservlet or a JSP.
3. The rwservlet asks OracleAS Single Sign-On to authenticate the user.

Oracle Reports Developer 10g: Move to the Web 5-31

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Handling Report Requests with


OracleAS Single Sign-On

rwservlet forwards request to Reports Server.


Reports Server validates user privileges
against OracleAS Portal schema in
OracleAS Metadata Repository.
Reports Server executes report request and
passes output to rwservlet.
Report output is passed to the Oracle HTTP Server.
Report output is passed to the user.

Copyright 2005, Oracle. All rights reserved.

Handling Report Requests with OracleAS Single Sign-On (continued)


4. OracleAS Single Sign-On requests the username and password.
5. Oracle HTTP Server displays the login page to the user, and the user provides the username
and password. The username and password are passed to OracleAS Single Sign-On, where
the credentials are verified with Oracle Internet Directory. If the user is authenticated,
OracleAS Single Sign-on server passes the user authenticated message to rwservlet.
After the user is authenticated, the report request must go through the authorization process:
6. The rwservlet forwards the request to the Reports Server.
7. Using the OracleAS Portal schema in the OracleAS Metadata Repository, the Reports
Server checks whether the user has the necessary privileges to run the report on the
specified server at the specified time to the specified destination. If the validation check
fails for any reason, then an error condition is returned to the user and the process
terminates.
8. The Reports Server delegates the job to an engine that accesses the data source, retrieves
the data, formats the report, and passes the output to rwservlet.
9. The report output is passed to the Oracle HTTP Server.
10. The report output is passed to the user.

Oracle Reports Developer 10g: Move to the Web 5-32

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Handling Report Requests with


OracleAS Single Sign-On

In this lesson, you should have learned how to:


Describe OracleAS Reports Services architecture
Distinguish between the JSP and Servlet run-time
architectures
Describe the various ways to run a report
Use the plug-in interface to extend Oracle Reports
functionality
List the options for managing and monitoring
OracleAS Reports Services
Describe how report applications and resources
are secured using OracleAS Single Sign-On

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 5-33

Oracle University and DATACTIVA Consultoria y Servicios 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 Developer 10g: Move to the Web 5-34

Oracle University and DATACTIVA Consultoria y Servicios 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.

This practice covers the following topics:

Deploying and running a report on the application


server
Validating report status using Oracle Enterprise
Manager
Running reports using a key map file

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 5-35

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 5-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

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

Copyright 2005, Oracle. All rights reserved.

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

Using New Features in Oracle Reports:


Deployment

After completing this lesson, you should be able to do


the following:
List the e-mail distribution enhancements
Explicitly specify the format for images in your
report output
Generate MS Excel output from paper reports
Use the PDF enhancement features
Describe the benefits of the Reports Server
integration with Oracle Wireless
Publish reports with OracleAS Portal

Copyright 2005, Oracle. All rights reserved.

Overview
In this lesson, you learn about some of the new deployment features in Oracle Reports.

Oracle Reports Developer 10g: Move to the Web 6-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

Objectives

Internet standard SMTP support


Support for static and dynamic data
Embed report as e-mail body or an attachment

Copyright 2005, Oracle. All rights reserved.

Report Distribution: E-mail Enhancements


Earlier in the course, you learned that report distribution enables you to design a report that can
generate multiple output formats and be distributed to multiple destinations from a single run of
the report. You can create distributions for an entire report, and for individual sections of the
report. E-mail is one of the out-of-the-box destinations provided by Oracle Reports that has been
enhanced since release 6i.
Report e-mail distribution is now based on the Internet e-mail Simple Mail Transfer Protocol
(SMTP). Additional enhancements allow you to enter a descriptive Subject, and include the
report in the body of the e-mail or as an attachment. Oracle Reports supports all the attributes
available in the SMTP e-mail header, such as TO, FROM, CC, BCC, ReplyTo, and so forth, and
these can be static or dynamic values from the report itself.
Reports Builder includes an e-mail dialog box to enable you to easily specify the recipients,
subject matter, and the format of the report. To e-mail a report from Reports Builder:
Open your report in Reports Builder and connect to your database.

Select File > Mail.


In the Mail dialog box, specify the recipients, the subject, and select the format for your email report. Click OK.

Oracle Reports Developer 10g: Move to the Web 6-3

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 6-4

Oracle University and DATACTIVA Consultoria y Servicios 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 Distribution: E-mail Enhancements (continued)


Example

Source image formats:


JPG, JPEG
Progressive JPEG
Exif JPEG

GIF
PNG
BMP
TIFF
CGM

Destination image formats:


JPG, JPEG
GIF
PNG
BMP

Copyright 2005, Oracle. All rights reserved.

Image Format Support


Web publishing often includes dynamic media content, from animated images to full-blown
animations and streaming content. The quality of images contributes considerably to the overall
appearance of a report, particularly for a Web report. You may prefer to use different image
formats in your report output depending upon your needs. For example, an aeronautical firm
might prefer the higher quality of Joint Photographic Experts Group (JPEG) or Portable Network
Graphics (PNG) images in their Web reports instead of graphics interchange format (GIF)
images. However, if you are building a Web portal, you may prefer GIF images because of their
smaller size and faster download time. Similarly, you may want to import images of these
various formats into your report.
Depending on the format of your report output, Oracle Reports 10g enables you to choose from a
variety of formats for your images. The enhancements in imaging support provide you with the
capability to generate complex graphics-intensive reports with high fidelity image output.

Oracle Reports Developer 10g: Move to the Web 6-5

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Image Format Support

Oracle Reports Developer 10g: Move to the Web 6-6

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Advanced Imaging Support (continued)


Oracle Reports supports the following formats:
Source Image Formats:
- JPEG / JPG: Joint Photographic Experts Group
- Progressive JPEG: JPEG image that comes into focus while it is being displayed
- Exif JPEG: exchangeable image file (Exif) format is an international specification
that lets imaging companies encode metadata information into the headers or
application segments of a JPEG file. This metadata information includes shutter
speed, aperture, and the date and time the image was captured.
- GIF: graphics interchange format
- PNG: Portable Network Graphics
- BMP: bitmap
- TIFF: tag image file format
- CGM: computer graphics metafile
Destination Image formats:
- JPEG / JPG
- GIF
- PNG
- BMP
Enabling Advanced Imaging
To enable advanced image formats in your report output, set the
REPORTS_DEFAULT_DISPLAY environment variable to YES and specify the default image
type using the REPORTS_OUTPUTIMAGEFORMAT environment variable.
Note: You can override the default image format using the OUTPUTIMAGEFORMAT command
line keyword.

Commands that can use OUTPUTIMAGEFORMAT:

rwclient rwrun rwbuilder rwservlet rwcgi

Syntax:

OUTPUTIMAGEFORMAT={PNG|JPEG|JPG|GIF|BMP}

Copyright 2005, Oracle. All rights reserved.

Using the OUTPUTIMAGEFORMAT Parameter


The OUTPUTIMAGEFORMAT parameter enables you to explicitly choose the format for images
in your report output. You can specify this parameter for the rwclient, rwrun, rwbuilder,
rwservlet, and rwcgi commands.
The values that you can specify for the OUTPUTIMAGEFORMAT parameter are:
PNG-, JPEG-, JPG-supported image formats when the destination format is PDF, HTML,
HTMLCSS, or RTF
GIF-supported image formats when the destination format is PDF, HTML, or HTMLCSS
BMP-supported image formats when the destination format is RTF
The format of the source image is converted to the format you specify using the
OUTPUTIMAGEFORMAT parameter. For example, invoke the Reports Builder using the
following command:
RWBUILDER.EXE HR/HR@ORCL OUTPUTIMAGEFORMAT=PNG
When you generate the report output to any file type, the output images are stored in PNG format
regardless of the source format. You must ensure that the format that you specify is compatible
with the report-output file type.

Oracle Reports Developer 10g: Move to the Web 6-7

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Using the OUTPUTIMAGEFORMAT Parameter

DESFORMAT

=
SPREADSHEET

Command line usage for


DESFORMAT=SPREADSHEET:
rwrun
rwclient
rwservlet
rwcgi
rwbuilder

Copyright 2005, Oracle. All rights reserved.

Generating Spreadsheet Output


There has always been a demand for generating output to spreadsheet-compatible applications,
such as Microsoft (MS) Excel, so that the output data can be further analyzed. In the past, several
approaches have been used to generate such output; for example, generating report output in
delimited text format (CSV file) and opening it in Microsoft Excel, or using JSP technology to
render a Web page in Microsoft Excel by changing the page contentType. However, there was
no easy way for users to produce output from paper reports in Microsoft Excel and, at the same
time, preserve the rich layout formatting.
Beginning with Oracle Reports 10g (10.1.2), you can generate output from paper reports directly
to files that can be opened in Microsoft Excel. Using the new DESFORMAT=SPREADSHEET
command line parameter, you can generate MS Excel output from existing paper layout reports
saved in any format (.rdf, .xml, .jsp), using rwrun or Reports Server clientsthat is rwcgi,
rwclient, and rwservlet. This new output format preserves the rich layout formatting such as
colors, fonts, conditional formatting, graphs, and images.
Note: You cannot generate SPREADSHEET output directly from Reports Builder; you need
OracleAS Reports Services. The default path for SPREADSHEET output on the Application
Server is <oracle_home>/j2ee/home. Also, you must have Microsoft Excel 2000 (or a
later version) installed on the client machine for viewing the output. This software is not required
on the OracleAS Reports Services machine.
Oracle Reports Developer 10g: Move to the Web 6-8

Oracle University and DATACTIVA Consultoria y Servicios 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 Spreadsheet Output

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 Reports Developer 10g: Move to the Web 6-9

Oracle University and DATACTIVA Consultoria y Servicios 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 Spreadsheet Output (continued)


Limitations
Be aware of these limitations when using DESFORMAT=SPREADSHEET:

http://myhost:80/reports/rwservlet?report=products.rdf&
server=repsvr1&userid=oe/oe@ORCL&destype=file&
desformat=spreadsheet&desname=products.xls

Copyright 2005, Oracle. All rights reserved.

Generating MS Excel Output


Example
To generate the paper layout of your report to Microsoft Excel output through a URL using
rwservlet, you can type a command on the command line similar to:
http://<hostname:portno>/reports/rwservlet?
report=<report_name>&server=<server_name>&
userid=<db_connect_string>&destype=file&desformat=spreadsheet
&desname=<filename>.xls
Technical Note
Microsoft Office 2000, 2002, and 2003 supports HTML as a native file format. Spreadsheet
output relies on producing HTML output, which can be understood by Microsoft Excel as a file
with valid Excel format.
When you specify a URL such as the one in the example above, the Reports Server internally
creates an HTML document in Excel-specific format. This output is a native Excel file with a
.xls extension.

Oracle Reports Developer 10g: Move to the Web 6-10

Oracle University and DATACTIVA Consultoria y Servicios 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 MS Excel Output

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

Copyright 2005, Oracle. All rights reserved.

Compressing PDF Output


You were introduced to PDF features, specifically, compression, font aliasing, font subsetting,
and font embedding, earlier in the course. Here, you learn how to take advantage of these
features when deploying your reports, starting with PDF compression.
PDF compression decreases the PDF file size, thereby reducing the time required to download
the PDF file. The amount of space saved using compression varies based on the contents of the
report (for example, the number of images versus the size of the content.)
Compressed files are typically about one-fifth the size of the original file. Although compressed
files download quickly, the time taken to generate a compressed file is much more when
compared to a noncompressed file.
By default, the PDF output generated by Oracle Reports is compressed. Use the keyword
PDFCOMP on the command line to specify the level of compression. The syntax is:
PDFCOMP=value|{YES|NO}
where,

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.

YES compresses output at a level of 6. This is the default.

NO is equivalent to setting the value to 0that is, no compression.


Oracle Reports Developer 10g: Move to the Web 6-11

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Compressing PDF Output

Font aliasing
Font subsetting
Font embedding

Copyright 2005, Oracle. All rights reserved.

Enhanced PDF Output


The PDF enhancements in Oracle Reports make your report output clearer, searchable, and
accessible.
As an experienced Reports developer, you are familiar with the font configuration file,
uifont.ali, located in the oracle_home\tools\common directory on Windows. The
font configuration file has been updated to include three new sections:
[PDF]: For font aliasing and multibyte language support
[PDF: Embed]: For Type1 font embedding
[PDF:Subset]: For TrueType font subsetting and multibyte language support
In previous releases of Oracle Reports, you used this file for font aliasing, the mechanism in
Oracle Reports that allows a font or its associated attributes such as style, weight, width, size and
character set, to be mapped to another desired font or its associated attributes. Font aliasing is
primarily used when applications are ported from one platform to another, and the font
associated with some or all of the objects in the layout on the source platform does not exist on
the target platform.
You can now include font aliasing information specifically for your PDF reports in the font
configuration file.

Oracle Reports Developer 10g: Move to the Web 6-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

Enhanced PDF Output

Oracle Reports Developer 10g: Move to the Web 6-13

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Enhanced PDF Output (continued)


Technical Note
Type1 font is the most widely used type of PostScript font. In Windows, each font is
composed of .pfa (PostScript Font ASCII) and .pfb (PostScript Font Binary) files.
These files contain descriptions of the character shapes, with each character being
generated by a small program that calls on other small programs to compute common parts
of the characters in the font.
TrueType is a scalable font technology that renders fonts for both the printer and the screen.
Originally developed by Apple, the technology was enhanced jointly by Apple and
Microsoft. TrueType fonts are included in both operating systems. Unlike PostScript, in
which the algorithms are maintained in the rasterizing engine, each TrueType font contains
its own algorithms for converting the outline into bitmaps. The lower-level language
embedded within the TrueType font allows unlimited flexibility in the design.

Copyright 2005, Oracle. All rights reserved.

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.

NO: The fonts will not be added to PDF output.


The default value is YES.

Oracle Reports Developer 10g: Move to the Web 6-14

Oracle University and DATACTIVA Consultoria y Servicios 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

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 6-15

Oracle University and DATACTIVA Consultoria y Servicios 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)

Font embedding takes no precedence. (Lowest)

Oracle Reports Developer 10g: Move to the Web 6-16

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


To use the font subsetting feature:
Include the font file path in the REPORTS_PATH environment variable, for example,
C:\WINNT\Fonts.
Open the uifont.ali file and edit the [PDF:Subset] section to specify the
TrueType font name. For example, to subset Arial True Type font in your PDF report,
modify the font configuration file as follows:
[PDF:Subset]
Arial = "Arial.ttf"

Implemented through PL/SQL stored procedures


Uses include:

Running a report
Displaying report status
Canceling a report
Managing parameter lists

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 6-17

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 6-18

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


The API consists of several key elements:

Create a database trigger.


Include a parameter list with the required entries:

GATEWAY
SERVER
REPORT
USERID

AUTHID (if job is run on a secure server)

SRW.RUN_REPORT(SRW
_PARAMLIST object)

Copyright 2005, Oracle. All rights reserved.

Invoking a Report from a Database Event


Database triggers are the primary mechanism for invoking reports using the event-driven
publishing API. The Oracle database allows you to define various scopes of triggers that fire in
response to various events.
Consider these scenarios for using event-driven publishing:
You can create security protocols using a trigger that fires whenever a grant privilege
occurs, or a user logs on or off.
You can create automated processes that respond to certain types of changes to data in a
table. For example, create a database trigger that fires when an employee files an expense
report. That is, when the status of an expense report changes to DONE, the trigger code
should automatically send a report to the employee's manager.

Oracle Reports Developer 10g: Move to the Web 6-19

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Invoking a Report from a Database Event

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.

REPORT identifies the report file to be run.


USERID identifies the user ID and password of the person running the report.

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 Reports Developer 10g: Move to the Web 6-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

Invoking a Report from a Database Event (continued)


Example: Send a report when an employee has submitted an expense report. The code for the
trigger is as follows:
CREATE TRIGGER EXP_REP_TRG AFTER INSERT OR UPDATE on
EXP_REP FOR EACH ROW
myPlist SRW_PARAMLIST;

Wireless destination

Send report as a fax.


Provide senders and receivers phone numbers.

http://Myserver.com:7778/reports/rwservlet?report=myreport.rdf
&destype=oracleWireless&desname=1-650-345-4567&...

Wireless notification

Use OracleAS Wireless to notify you upon success or


failure of a job.

Supported Protocols: WAP, SMS, Voice, Fax, Email

http://myserver.com:7778/reports/rwservlet?report=myR
eport.rdf&callonsuccess=voice:1-555-555-1234&...

Copyright 2005, Oracle. All rights reserved.

OracleAS Wireless Integration


Mobile devices have revolutionized the world of telecommunication. To keep up with this
changing trend of information dissemination, OracleAS Reports Services is integrated with
OracleAS Wireless to enable you to send your report output to wireless devices. You can send
your report to a fax machine using Wireless, the new pluggable destination in Oracle Reports. To
use this feature, all you have to do is register the destination with the Reports Server, provide the
fax number, and you are all set to send the report to the fax machine.
Wireless Notifications
In addition to sending report output to wireless devices, you can also receive notifications
regarding whether your job succeeded or failed through e-mail, fax, voice mail, or SMS /WAP
on your cell phone. The Wireless pluggable notification makes this possible.
Technical Note
The JAR files required to configure the Wireless Destination and the Wireless Notification are
both available from OTN as downloads. For information on how to set up and run the Wireless
pluggable destination or Wireless pluggable notification, refer to the Oracle Reports: Plugin
Exchange section on OTN. To use the Wireless feature of Oracle Reports, you must have
OracleAS Wireless installed and configured on your network.

Oracle Reports Developer 10g: Move to the Web 6-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

OracleAS Wireless Integration

Publish your report:


DESTYPE=oraclePortal
DESTYPE=WEBDAV

As a portlet
As an item

Copyright 2005, Oracle. All rights reserved.

Integrating Oracle Reports with OracleAS Portal


OracleAS Portal is a component of Oracle Application Server with which you develop, deploy,
administer, and configure enterprise-class portals. OracleAS Portal incorporates a portal-building
framework with self-service publishing features that enable you to create, publish, and manage
information within your portal. The basic structural components of a portal built with OracleAS
Portal include page groups, pages, tabs, regions, portlets, and items.
Oracle Reports is integrated with OracleAS Portal to enable you to publish your report output in
your enterprise portal. You can upload your report output to a portal page using the DESTYPE
command line keyword. You can also use the declarative, secure interface of OracleAS Portal to
deploy your reports.
Using DESTYPE
To send your report output to OracleAS Portal, specify DESTYPE=oraclePortal and
include the portal page group and page on which you want your report output to be displayed.
For example,
http://MyAppServer.com:80/reports/rwservlet?server=repsrv1
&report=sales.rdf&userid=oe/oe@ORCL&destype=oraclePortal
&desformat=PDF&pagegroup=salespagegrp&outputpage=DivisionA
&itemtitle=AMER_Sales&statuspage=Result

Oracle Reports Developer 10g: Move to the Web 6-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

Integrating Oracle Reports with OracleAS


Portal

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 Reports Developer 10g: Move to the Web 6-23

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Integrating Oracle Reports with OracleAS Portal (continued)


In this example, the output from the report sales.rdf will be displayed on the Division_A
portal page when the user clicks the AMER_Sales link. The Division_A page belongs to the
salespagegroup page group.

To deploy reports with OracleAS Portal:


Install Oracle Application Server.
Configure OracleAS Reports Services.
Configure OracleAS Portal.

Create report users and groups.


Register Oracle Reports components.

Copyright 2005, Oracle. All rights reserved.

Deploying Reports with OracleAS Portal


One of the best ways to publish your report is through the declarative, secure interface of
OracleAS Portal.

Oracle Reports Developer 10g: Move to the Web 6-24

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports with OracleAS Portal

User

Group

User

Group

DAS interface

OracleAS Portal
Copyright 2005, Oracle. All rights reserved.

Creating Reports Users and Groups


OracleAS Portal provides security features that you can use to control access to your reports.
To use these security features, you must register all your Oracle Reports users in the Oracle
Internet Directory (OID) and assign security privileges to all of them through OracleAS Portal.
In OracleAS Portal, security privileges can be granted to individual users or named groups of
users. Named groups of users are useful for streamlining the process of granting access
privileges. You can assign a set of access privileges to a named group, and grant the entire set of
privileges to an individual by adding that person to the group.
When you install OracleAS Portal, the following Oracle Reportsrelated groups are created for
you automatically:

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

Creating Reports Users and Groups

To learn more about the creation of new users and groups in OracleAS Portal, refer to the Oracle
Application Server Portal Configuration Guide.

Oracle Reports Developer 10g: Move to the Web 6-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

Creating Reports User and Groups (continued)


OracleAS Portal uses the Delegated Administration Service (DAS) interface to the Oracle
Internet Directory (OID) to register users for access to Portal. You can enter the DAS interface
through Portal to create new users.

Registering a Reports Server


Registering a report
Registering a printer
Creating an availability calendar
Copyright 2005, Oracle. All rights reserved.

Registering Oracle Reports Components


Before you register Oracle Reports components, you must have the proper privileges in
OracleAS Portal to access the portlets and complete the tasks required for setting access controls.
To manage reports in OracleAS Portal, you must belong to both the
PORTAL_ADMINISTRATORS and RW_ADMINISTRATOR groups.
Prior to defining access to Oracle Reports components, you must:
Register a Reports Server
Register a report
Optionally, you can register a printer, as well as create an availability calendar to further restrict
access to servers, reports, and printers.
Creating a Portal DB Provider for Oracle Reports Objects
Before you define access to any of the Oracle Reports components, you must first create a Portal
DB provider that will contain the OracleAS Portal objects related to the Oracle Reports
integration.
Note: To learn more about how to create a Portal DB provider, see OracleAS Portal online help.

Oracle Reports Developer 10g: Move to the Web 6-27

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Registering Oracle Reports Components

Copyright 2005, Oracle. All rights reserved.

Registering a Reports Server in OracleAS Portal


To publish your reports on OracleAS Portal, you must register your Reports Server in
OracleAS Portal. Registration provides OracleAS Portal with the information it needs to
identify and locate all available Reports Servers. This becomes particularly important when
you register individual reports; during this process you are required to choose from a list of
Reports Servers, and servers must be registered to appear on this list.
To register a Reports Server:
1.
2.
3.
4.
5.
6.

Log in as an administrator to OracleAS Portal and display the Builder page.


Click the Administer tab.
In the Oracle Reports Security portlet, click the Oracle Reports Security Settings link.
In the Reports Server Access portlet, click the Create Reports Server Access link.
Specify the details shown in the following table.
Click Finish.

Oracle Reports Developer 10g: Move to the Web 6-28

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Registering a Reports Server


in OracleAS Portal

Field

Description

Name

Unique name that identifies the Reports Server internally in


OracleAS Portal. Example: MY_REPORTS_SERVER

Display Name

Name that is exposed to your users through OracleAS


Portal. Example: My Reports Server

Portal DB Provider

Select the Portal DB Provider that owns the Reports Server.

Reports Server Name

Unique name assigned to the server when it was started.

Oracle Reports Web Gateway


URL for JSP Reports

URL location of your JSP files on the Application Server


Example: http://MyAppSvr.MyComp.Com:7778/

Oracle Reports Web Gateway


URL for RDF reports

URL location of your Reports Servlet. Example:


http://MyAppSvr.MyComp.Com:7778/reports
/rwservlet

Printers

Select the printer(s) that you want to make available to this


Reports Server

Availability Calendar

Oracle Reports component that defines the days and times


this Reports Server is available to accept report requests.

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 Reports Developer 10g: Move to the Web 6-29

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Registering a Reports Server in OracleAS Portal (continued)

Copyright 2005, Oracle. All rights reserved.

Registering a Report in OracleAS Portal


Registering a report is a required step that enables you to define who can run a report, when a
report is available to run, which servers can be used to process report requests, how a report is
delivered, and the printers to which a report can be sent.
Registering a report in OracleAS Portal creates an OracleAS Portal component that can be
deployed as a portlet.
To register a report:
1. Log in as an administrator to OracleAS Portal and display the Builder page.
2. Click the Administer tab.
3. In the Oracle Reports Security portlet, click the Oracle Reports Security Settings link.
4. In the Reports Definition File Access portlet, click the Create Reports Definition File
Access link.
5. Follow the steps in the wizard to describe the access to your report file. Click the help icon
(the question mark in the upper-right corner) to access additional information to aid you in
specifying the settings.
6. Click Finish when you have completed the wizard.

Oracle Reports Developer 10g: Move to the Web 6-30

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Registering a Report in OracleAS Portal

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 Reports Developer 10g: Move to the Web 6-31

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Registering a Report in OracleAS Portal (continued)


7. Click the Access tab.

Copyright 2005, Oracle. All rights reserved.

Publishing a Report as a Portlet


Now that you have registered your report, you can expose it in OracleAS Portal by:
Adding the report as a portlet on a page. A portlet is a reusable, pluggable Web component
used to easily publish information and applications.
Adding the report as a item on a page. An item is an individual piece of content (text,
hyperlink, image, and so forth) that resides on a portal page in an item region.
To publish a report as a portlet:
1. In the Portal Builder page, click the Build tab.
2. In the Page Groups portlet, select the page group in which you want to place your report
portlet.
- To add your report portlet to a new page, click the Create a Page link. Follow the
steps in the wizard and click Finish.
- If you want to use an existing page, select the page in the Edit a Page section and
click the Edit button.
3. The page is displayed in the Edit view. Click the Add Portlet icon in the page region where
you want to add your report portlet.
4. Drill down through the Portlet Repository to the Portal DB Provider that contains the report
portlet.
Oracle Reports Developer 10g: Move to the Web 6-32

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Publishing a Report as a Portlet

Customizing the Report Portlet


To customize your report portlet settings, click the Customize link in the upper-right corner of
your report portlet. The Reports Portlet Parameter Form appears. On the Parameter tab, you can
specify default values for your report parameters. Using the Schedule tab, you can schedule the
report to run automatically.
Note: The Parameters page displays only those report parameters that you exposed to users
through the Customize page of your Reports Definition File Access component.

Oracle Reports Developer 10g: Move to the Web 6-33

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Publishing a Report as a Portlet (continued)


5. Click the name of your report portlet to add it to the Selected Portlets list. Click OK.
6. The report is displayed as a portlet on your page. The size of the portlet is controlled by the
Portlet Width and Portlet Height parameters that you specify on the Customize page for the
Reports Definition File Access component.

Copyright 2005, Oracle. All rights reserved.

Adding a Report as an Item on a Portal Page


To add an Oracle Reports item to a portal page:
1. Navigate to the Portal Builder page and click the Build tab.
2. In the Page Groups portlet, choose the page group in which you want to place your report
item link. Select or create the page on which you want to add the report item link.
3. In the Edit view of the page, click the Add Item icon. From the Content Item Types dropdown list, select Oracle Reports as the item type.
Note: If the Oracle Reports item type is not available, configure the list of available item
types to include this item type in your page group.
4. In the Add Oracle Reports page, enter a display name for the Oracle Reports item. Select
the relevant report definition using the Oracle Reports components drop-down list.
5. Select Display Parameter Form if you want the end user to provide parameters before the
report is run. If you choose not to make the Parameter Form visible to the end user, then
you must ensure that all the default parameter values are valid.
6. Select Link That Displays Item In New Browser Window to always view the report in a
separate window. Click Finish.

Oracle Reports Developer 10g: Move to the Web 6-34

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Adding a Report as an Item on a Page

1
2

Copyright 2005, Oracle. All rights reserved.

Running an Oracle Reports Item


Running a report that has been added to a portal page as an item may be more involved than
running the report as a portlet. As an end user, you must perform the following steps to run an
Oracle Reports item:
1. Click the Run Report link.
Note: The Run Report link is an associated function of the Oracle Reports item. If the
parameter form has not been enabled, then the report is displayed to the user either in the
same browser window, or in a new browser window
2. If you enabled the parameter form, then a form containing two tabs is displayed.
The first tab lists the parameters made public in the Report Definition File Access
Descriptor.
The second tab enables you to enter scheduling information for the report. The user
interface provides a flexible manner for you to specify when you want the report to
execute.

Oracle Reports Developer 10g: Move to the Web 6-35

Oracle University and DATACTIVA Consultoria y Servicios 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 an Oracle Reports Item

In this lesson, you should have learned how to:


List the e-mail distribution enhancements
Explicitly specify the format for images in your
report output
Generate MS Excel output from paper reports
Use the PDF enhancement features
Describe the benefits of the Reports Server
integration with Oracle Wireless
Publish reports with OracleAS Portal

Copyright 2005, Oracle. All rights reserved.

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

This practice covers the following topics:


Sending report output to MS Excel
Publishing a report to your portal page using
OracleAS Portal as the report destination
Publishing reports as items and portlets using
OracleAS Portal

Copyright 2005, Oracle. All rights reserved.

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 Reports Developer 10g: Move to the Web 6-37

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 6-38

Oracle University and DATACTIVA Consultoria y Servicios 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

Reports Server Name

Enter the unique name assigned to the server when


it was started.
http://AppServer:port

Oracle Reports Web Gateway URL


for JSP Reports
Oracle Reports Web Gateway URL
for RDF reports

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

Oracle Reports File Name p3q1.jsp


Execute

via servlet

Destination Type

Cache

Destination Format

HTML

Optional Parameters:
Name
Display Name

userid
userid

Oracle Reports Developer 10g: Move to the Web 6-39

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web 6-40

Oracle University and DATACTIVA Consultoria y Servicios 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

Obtain from instructor

Database SID

Obtain from instructor

Application Server
host name

Obtain from instructor

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 Reports Developer 10g: Move to the Web A-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

Information Needed for Practices


Your instructor will give you information to use in your practices. You can record it below:

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-3

Enter http://www.oracle.com/technology/products/reports/index.html in the Address


field.
Locate and click the link Oracle Forms, Oracle Reports, Oracle Designer Statement of
Direction.
Review the document.

Oracle Reports Developer 10g: Move to the Web A-4

Oracle University and DATACTIVA Consultoria y Servicios 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.

Replacing button functionality with an image and hyperlink

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 Reports Developer 10g: Move to the Web A-5

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-6

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-7

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


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.
Display the Paper Layout view for the report. Ensure that the margin area is
visible in the Paper Layout view. Toggle the Edit Margin tool in the toolbar if
the margin is not displayed.
Scroll to the bottom of the page and delete the text item.
Select Insert > Image from the menu and locate the file phone.gif. The image is
inserted in the upper left corner of the layout. Move the image to the bottom margin
and resize as desired. Add boilerplate text, if desired, to associate the image with the
Local Phone Book.
Locate the button action procedure under the Program Units node and double-click
it to display its code. Alternatively, right-click the node and select PL/SQL Editor
from the menu. Note the name of the report that was called when the user clicked
the button: local_phone_listing.pdf.
Display the Property Inspector for the image you added to the Paper Layout.
Locate the Hyperlink property. Specify a value of
local_phone_listing.pdf.
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.
Save your report module.
Select File > Generate to File > PDF. Save the file as migrated.pdf.
Open migrated.pdf in a browser window. Scroll to the bottom of the file and
click the phone image. The report local_phone_listing.pdf should display.

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 Reports Developer 10g: Move to the Web A-8

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-9

Oracle University and DATACTIVA Consultoria y Servicios 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: Solutions


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

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

Sort the output by product number.


Create a new report using the Report Wizard. Create both a Web and paper
layout. Select Tabular as the style and enter Our Products as the title. Select
SQL as the data source and enter the query:
SELECT product_id, product_name,
product_description, catalog_url
FROM products
ORDER BY product_id
Select all fields for display. Do not create any totals. Modify the labels as above.
b. Select the predefined Beige template.
Select the Beige template and finish the Wizard.
c. Run the Web layout to test.
Select Program > Run Web Layout from the menu or select the Run Web
Layout button from the horizontal tool bar.
d. Save the report as p3q2.jsp.

Oracle Reports Developer 10g: Move to the Web A-10

Oracle University and DATACTIVA Consultoria y Servicios 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: Solutions (continued)


f. Which JSP tag identifies the overall appearance and formatting of the data in the Web
report?
The rw:style tag identifies the style sheet for the report.

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 Reports Developer 10g: Move to the Web A-11

Oracle University and DATACTIVA Consultoria y Servicios 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: Solutions (continued)


3. Create a new Web report by adding dynamic content to an existing Web page.
a. Open the mywebpage.htm file in Reports Builder.
b. Define a data model using the Data Wizard. Import the query p3q3.sql.
Use DEPARTMENT_ID and DEPARTMENT_NAME as the group fields.
Include a sum of the salaries.
Display the Data Model view of the Report Editor. Right-click in the Data Model
painter area and select Data Wizard from the shortcut menu.
Select SQL Query on the Data Source page.
Import the query p3q3.sql.
Copy department_id and department_name from the Available Fields
area to the Group Fields area. Be sure both columns are at the same level (Level
1).
Select the salary column and click Sum >.
Click Finish to complete the Data Model Wizard.
c. Save the report as p3q3.jsp.

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="&nbsp;" 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

Practice 3-2: Solutions


1. Customize report p3q3.jsp using JSP tag attributes.

Save your changes.


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.
Column

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 Reports Developer 10g: Move to the Web A-13

Oracle University and DATACTIVA Consultoria y Servicios 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: Solutions (continued)


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.
Using a text editor, locate and open the file rwTemplates.xml.
Scroll down in the file and add a new entry for your template: <webTemplate
id=bd_template" cssFile="rwgray.css"
classSet=caboclassSet" htmlFile=bd_template.html"/>

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 Reports Developer 10g: Move to the Web A-14

Oracle University and DATACTIVA Consultoria y Servicios 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: Solutions (continued)


4. Your customer at BioDiversity Umbrella, Inc. would like to be able to view employee
information for a specific department at run time. You agree to create a simple HTML
parameter form for the report.
a. Create an HTML page that contains a list of values, a field, and a button. The code
for this page is provided for you in the paramform.html file. Examine the code
using a text editor. Modify the connect string using the database credentials for your
class account. Save your modifications. Display the file in your browser.
Using a text editor, locate and open paramform.html.
Modify the database connection information with your username, password, and
connect string. Save your modifications.
Display the parameter form in your browser. It contains a static LOV, a field
with your database credentials, and a button.
b. Modify the HTML page in Reports Builder to dynamically populate the LOV in the
form with an alphabetized list of department names and corresponding department
numbers. Save the parameter form as a Reports JSP.
Open your HTML file in Reports Builder.
In the Object Navigator, double-click the icon next to the Data Model node to
display the Data Model view.
Use the SQL Query tool to define the query:
select
department_name, department_id
from
departments
order by department_name
Click OK.
Save the module as paramform.jsp.

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 Reports Developer 10g: Move to the Web A-15

Oracle University and DATACTIVA Consultoria y Servicios 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: Solutions (continued)


d. Modify report p3_2q3.jsp to accept parameter to accept the p_department
parameter. Save the report as p3_2q4.jsp.
Open report p3_2q3.jsp in Reports Builder if it is not already open. In the
Object Navigator, double-click the icon next to the Data Model node to display
the Data Model view.
Double-click the query to display the SQL Query Statement dialog
box.
Modify the WHERE clause to reference a bind variable for the department ID:
WHERE and departments.department_id = :p_department
Click OK. Acknowledge the message from Reports Builder indicating that a bind
variable was created.
Save the report as p3_2q4.jsp.

Oracle Reports Developer 10g: Move to the Web A-16

Oracle University and DATACTIVA Consultoria y Servicios 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.

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.
Select the XML Query tool. Click in the painter area of the Data Model view.
Specify the Data Definition by clicking the Browse button and locating the file
warehouse_inventory.xsd. Make sure the file type selected in the Open
dialog box is XSD.
Specify the Data Source by clicking the Browse button and locating the file
warehouse_inventory.xml.
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.
Select the Data Link tool. Click and drag from WAREHOUSE_ID in the SQL
query group to WAREHOUSE_ID1 in the XML query group.
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.
Invoke the Report Wizard. Work through the pages of the wizard making the
selections as indicated. Click Finish to run the paper layout.
f. Save the report as p4q1.jsp.
g. Run the Web layout for the report.

Oracle Reports Developer 10g: Move to the Web A-17

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-18

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


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.
Locate the repeating frame R_G_WAREHOUSE_ID in the Object Navigator.
Delete the repeating frame.

Graph Type

Bar

Graph Subtype

Bar

Position

at the end of the report

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

Order Total per Sales Rep

Graph Type

Horizontal Bar

Graph Subtype

Bar

Enter the above properties in the wizard pages.


Click OK.
b. Run the paper layout to test.
c. Save report as p4q4.jsp.
5. Continue with report p4q4.jsp.
a. Run the Web layout. What do you see?
There is no graph displayed in the Web output because you have not yet added it
to the Web source.
Also, an error message appears: Cannot find cursor containing column
SumCust_totalPersales_rep_id because the name of the summary column was
changed in the Data Model but not in the Web source.
b. Update the Web source with the correct column name.
Display the Web Source view. Locate the reference for <rw:field
id="F_SumCust_totalPersales_rep_id"...>. Edit the source attribute
for this field to src="Total_Sales".
c. Run the Web layout again to test.
Oracle Reports Developer 10g: Move to the Web A-19

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)

Graph Type

Bar

Graph Subtype

Bar

Category

sales_rep_id

Data

total_sales

Title

Order Total per Sales Rep

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

Practice 4: Solutions (continued)


d. Add a graph to the Web source. Position the graph at the beginning of the report.
Display the Web Source view. Scroll down the code and position your cursor just
before Data Area Generated by Reports Developer.
Select Insert > Graph from the menu and enter the following properties on the
wizard pages:

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

Practice 4: Solutions (continued)


c. Create a format trigger on the field that displays the warehouse name. The format
trigger should fetch the page number for each warehouse name, and insert a
corresponding row into your TOC table. The code for the format trigger is provided
for you in the p4q6c.sql file.
Use the Object Navigator to locate the F_WAREHOUSE_NAME field under the
Paper Layout node.
Right-click and select PL/SQL Editor from the right-mouse menu.
The trigger code is provided for you in the file p4q6c.sql. Copy and paste the
code into the PL/SQL Editor.
Click Compile. Verify that the status bar of the Program Unit window displays
Successfully Compiled. Close the window.
d. Create another query in the data model with a formula column that calculates the
page range for the data under each warehouse name. The query will fetch the data
from your TOC table. The code for the query is provided for you in the
p4q6d1.sql file. The code for the formula column is provided for you in the
p4q6d2.sql file. Save your report.

Oracle Reports Developer 10g: Move to the Web A-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

Practice 4: Solutions (continued)


f. Run the paper layout.
Click the Run Paper Layout button on the tool bar. The table of contents
displays on the first page of the report. Navigate to various pages of your report
to view the data for each warehouse.

Oracle Reports Developer 10g: Move to the Web A-23

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-24

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-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

Practice 5: Solutions (continued)


In Enterprise Manager, click the link for your default Reports Server to display its
Home page.
In the Jobs section of the Home page, click the link for Finished Jobs. Is report
p3q2.jsp listed with a status of Finished successfully?

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

Practice 5: Solutions (continued)


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.
Open paramform.jsp in Reports Builder.
Hint: You might want to open the file from the directory
<oracle_home>/reports/j2ee/reports_ids/web on the Developer
Suite machine and save it in your working directory. This copy of the file should
already contain the correct value for the action attribute.
Display the Web source for the file.
Locate the type attribute for the input item and change it from text to
hidden.
Save your changes.
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.
Edit the key map file cgicmd.dat on the application server machine using a
text editor.
Add a new entry at the bottom of the file, following the format:
key_name: userid=username/password@connect_string
server=server_name %*
Save the file.

Oracle Reports Developer 10g: Move to the Web A-27

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-28

Oracle University and DATACTIVA Consultoria y Servicios 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 Reports Developer 10g: Move to the Web A-29

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


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.

Field
Name

Description
My_Reports_Server_xx

Display Name

My Reports Server xx

Portal DB Provider

EXAMPLE_APP

Reports Server Name

Enter the unique name assigned to the server when


it was started.
http://AppServer:port

Oracle Reports Web Gateway URL


for JSP Reports
Oracle Reports Web Gateway URL
for RDF reports

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 Reports Developer 10g: Move to the Web A-30

Oracle University and DATACTIVA Consultoria y Servicios 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 (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:

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

Oracle Reports File Name p3q1.jsp


Execute

via servlet

Destination Type

Cache

Destination Format

HTML

Optional Parameters:
Name
Display Name

userid
userid

On the Portal Builder home page, click the Administer tab.


In the Oracle Reports Security portlet, click the Oracle Reports Security
Settings link.
In the Reports Definition File Access portlet, click the Create Reports
Definition File Access link.
Follow the steps in the wizard to describe the access to your report file, using
the table above. Click Finish when youve completed the wizard.
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.
Click the Customize link. In the userid field, enter your user name, password,
and database connect string, for example: ora7/oracle@orcl.
Click Save Parameters and close the window. You are back in the Manage
portlet.
c. Using the Access tab, ensure that your report can be published as a portlet.
Click the Access tab. In the Portal Access section of the page, select the Publish
as Portlet option. Click Apply. Click Close.

Oracle Reports Developer 10g: Move to the Web A-31

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


4. Register report p3q1.jsp with OracleAS Portal.

a. Navigate to the Build tab of Portal Builder.


Click the Home link to return to the home page of Portal Builder. Click the
Build tab.
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.
In the Page Groups portlet, select your page group from the list. Click View.
Click the link to display your portal page.
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.
Click the Edit link.
Click the Add Item icon in the region that displays the Dept_Salaries report.
The Add Item wizard displays.
You are adding a Content Item Type to your page. Expand the list to see if type
Oracle Reports is listed. If it is not in the list of available item types, click the
configure the list of available item types link. In the Hidden Item Types list,
locate and select Oracle Reports. Use the Move Right icon to move the item type
to the Visible Item Types list. Click OK.
Now select Oracle Reports from the Content Item Type list and click Next.
Enter a display name, such as Sales Report.
Select SALES_REPORT_XX from the Oracle Reports Components list.
Ensure that the Link that Displays Item in a New Browser Window option is
selected.
Click Finish.
d. View your portal page and run your report.
Your page returns is edit mode. Click the View Page link in the upper-right
portion of the page.
Click the Run Report link next to your Sales Report.
Since no parameters are available for customization, click OK to execute your
report.

Oracle Reports Developer 10g: Move to the Web A-32

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


5. Publish report Sales Report xx as an Oracle Reports item on your portal page.

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 Reports Developer 10g: Move to the Web A-33

Oracle University and DATACTIVA Consultoria y Servicios 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 (continued)


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.

Oracle University and DATACTIVA Consultoria y Servicios Informaticos LTDA use only

THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED

Vous aimerez peut-être aussi