Вы находитесь на странице: 1из 420

Oracle Reports Developer 10g: Build Reports

Electronic Presentation

D17075GC10 Production 1.0 June 2004 D39524

Authors Ellen Gravina Smitha Keshav Technical Contributors and Reviewers Cem Ayberkin Christian Bauwens Alena Bugarova Kathryn Cunningham Laurent Dereac Mark Fleming Warren Lord Marcelo Manzano Darren McBurney Paul Narth Daphne Nougier Miyuki Ohsato Ligia Jasmin Robayo Jim Safcik Rie Saitoh Navneet Singh Sarah Spicer Martijn van der Bruggen Vanessa Wang Philipp Weckerle Ted Witiuk Publisher Sujatha Nagendra

Copyright 2004, Oracle. All rights reserved. This documentation contains proprietary information of Oracle Corporation. It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable: Restricted Rights Legend Use, duplication or disclosure by the Government is subject to restrictions for commercial computer software and shall be deemed to be Restricted Rights software under Federal law, as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988). This material or any portion of it may not be copied in any form or by any means without the express prior written permission of the Education Products group of Oracle Corporation. Any other copying is a violation of copyright law and may result in civil and/or criminal penalties. If this documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with Restricted Rights, as defined in FAR 52.227-14, Rights in DataGeneral, including Alternate III (June 1987). The information in this document is subject to change without notice. If you find any problems in the documentation, please report them in writing to Worldwide Education Services, Oracle Corporation, 500Oracle Parkway, Box SB-6, Redwood Shores, CA 94065. Oracle Corporation does not warrant that this document is error-free. Oracle is a registered trademark and all references to Oracle and Oracle Products are trademarks or registered trademarks of Oracle Corporation. All other products or company names are used for identification purposes only, and may be trademarks of their respective owners.

Introduction

Copyright 2004, Oracle. All rights reserved.

Course Objectives

After completing this course, you should be able to do the following: Describe the capabilities of Oracle Reports Develop and maintain Web and paper reports in different styles using Reports Builder Lay out and format data to meet user reporting requirements Incorporate text, images, and graphics in reports

Copyright 2004, Oracle. All rights reserved.

Course Content

Day 1: Introducing Oracle Reports Developer Designing and running reports Working in Oracle Reports Builder Creating and modifying paper reports using the Wizard Enhancing a paper report in the Paper Design view Day 2: Managing templates Creating a Web report Enhancing report structure
Copyright 2004, Oracle. All rights reserved.

Course Content

Day 3: Using the paper layout Modifying properties Using Web reporting Extending functionality using XML Day 4: Customizing reports with parameters Embedding graphs Enhancing matrix reports Adding PL/SQL code

Copyright 2004, Oracle. All rights reserved.

Course Content

Day 5: Extending functionality using the SRW package Using OracleAS Reports Services Efficiency and performance guidelines

Copyright 2004, Oracle. All rights reserved.

Introduction to Oracle Reports Developer

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe business intelligence List the benefits of enterprise reporting Describe the differences between Web publishing and paper publishing Describe the key features of Oracle Reports Developer Describe the architecture of Oracle Application Server Describe OracleAS Reports Services

Copyright 2004, Oracle. All rights reserved.

Business Intelligence
Discoverer Server Reports Server

XML

Copyright 2004, Oracle. All rights reserved.

Enterprise Reporting

Provides access for more users to vital customized information Lowers cost of ownership Uses integrated business intelligence
Any Client Web Application Server Data Server

Copyright 2004, Oracle. All rights reserved.

Enterprise Reporting

Reporting

Ad hoc query

Web Client

Advanced analysis Data Server Application Server

Copyright 2004, Oracle. All rights reserved.

Web Publishing

GIF89a hyperlinks

JavaScript

Copyright 2004, Oracle. All rights reserved.

Paper Publishing

8.5

GIF89a

hyperlinks 11 JavaScript

Copyright 2004, Oracle. All rights reserved.

Oracle Reports Developer


Publish data from any source, in any format, to any destination with high fidelity.

JDBC OLAP XML TEXT <Your Data Source>

Copyright 2004, Oracle. All rights reserved.

Benefits

Publish data from any source, in any format, with high fidelity Develop one time and deploy anywhere Open, standards-based, modular architecture

Copyright 2004, Oracle. All rights reserved.

Oracle 10g Products

Oracle 10g provides the complete solution: Oracle Database 10g Oracle Developer Suite 10g Oracle Application Server 10g

Copyright 2004, Oracle. All rights reserved.

Oracle Database 10g

Oracle Database 10g manages all of your data:


Relational Data

Documents

Multimedia

Copyright 2004, Oracle. All rights reserved.

Oracle Developer Suite 10g


Application Development

Copyright 2004, Oracle. All rights reserved.

Oracle Developer Suite 10g


Business Intelligence

Copyright 2004, Oracle. All rights reserved.

Oracle Application Server 10g

Browser

Oracle DB Non-Oracle

Wireless

Packaged Apps

Web Services

B2B Apps

Copyright 2004, Oracle. All rights reserved.

Oracle Reports Developer

User-friendly wizards Pluggable data sources Customizable report templates WYSIWYG live editor for paper reports Dynamic Web publishing using JSP/HTML Run-time customization Dynamic SQL execution Portal integration Event-based reporting

Copyright 2004, Oracle. All rights reserved.

OracleAS Reports Services

Flexible reporting Reduced overhead Fast distribution Real time publishing

Copyright 2004, Oracle. All rights reserved.

OracleAS Reports Services Architecture for the Web

HTTP Oracle HTTP Listener mod_OC4J JSP Engine Oracle Internet Directory CORBA/IIOP OracleAS Reports Services CORBA/IIOP Reports Engine PDS

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Describe integrated business intelligence List the benefits of enterprise reporting Describe the challenges of publishing for different media List the Oracle 10g products List the key features and benefits of Oracle Reports Developer Describe OracleAS Reports Services

Copyright 2004, Oracle. All rights reserved.

Designing and Running Reports

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Identify user requirements Name the common report styles Describe the structure of each style Run prebuilt reports as an end user Identify supported report file types

Copyright 2004, Oracle. All rights reserved.

Understanding User Requirements

What data Parameters

Web features Security

Web or Paper

Charts Drill down

Copyright 2004, Oracle. All rights reserved.

Designing Reports

Before you start development, consider:


Specification Data retrieval Common features Structure

Style Publishing Medium

Copyright 2004, Oracle. All rights reserved.

Tabular
List of Products Product Number

Description

Price

Copyright 2004, Oracle. All rights reserved.

Master-Detail
Outstanding Customer Items Customer Name Product Number Price

Customer Name Product Number Price

Copyright 2004, Oracle. All rights reserved.

Master with Two Details


Customer Statistics Customer Outstanding Items Product Number Price Orders in Last Six Months Order No. Date Total Value

Copyright 2004, Oracle. All rights reserved.

Matrix
Customer Matrix Product ID Customer

Copyright 2004, Oracle. All rights reserved.

Retrieving and Sharing Data

Keep database access to a minimum Consider report structure and number of queries Make effective use of common code and objects

Copyright 2004, Oracle. All rights reserved.

Running a Report

Your browser OracleAS Portal application Command line (Start > Run) OracleAS Reports Queue Manager Java application Database trigger Menu integrated with a Forms application Button in a Forms application

Copyright 2004, Oracle. All rights reserved.

Previewing Reports

Copyright 2004, Oracle. All rights reserved.

Print Preview
1 2 3

Copyright 2004, Oracle. All rights reserved.

Print Preview
1 2 3

Copyright 2004, Oracle. All rights reserved.

Supported File Types

RDF REP JSP HTML XML

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Identify key questions to help understand user requirements List the simple report styles and describe their underlying structures Identify key design considerations:
Report style Database access Common code Common objects

List the various options for running a report

Copyright 2004, Oracle. All rights reserved.

Practice 2 Overview

Executing existing reports

Copyright 2004, Oracle. All rights reserved.

Working in Oracle Reports Developer

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the main Oracle Reports executables Describe the main components of Reports Builder Describe the main objects in a report

Copyright 2004, Oracle. All rights reserved.

Reports Developer Executables

Developer
Reports Builder rwbuilder Reports Runtime rwrun Reports Converter rwconverter

Reports Services
Reports Server rwserver Reports Client rwclient Queue Manager rwrqm

Reports Servlet rwservlet

Reports CGI rwcgi

Copyright 2004, Oracle. All rights reserved.

Invoking Reports Builder

Copyright 2004, Oracle. All rights reserved.

Reports Builder Modules

Report

Template

PL/SQL Library

Copyright 2004, Oracle. All rights reserved.

Report Data and Layout

Paper

Web

Copyright 2004, Oracle. All rights reserved.

Reports Builder Components

Copyright 2004, Oracle. All rights reserved.

Reports Builder Components

Copyright 2004, Oracle. All rights reserved.

Reports Builder Components

Copyright 2004, Oracle. All rights reserved.

Reports Builder Components

Copyright 2004, Oracle. All rights reserved.

Main Menu Structure

Copyright 2004, Oracle. All rights reserved.

Main Menu Structure

Copyright 2004, Oracle. All rights reserved.

Main Menu Structure

Copyright 2004, Oracle. All rights reserved.

Main Menu Structure

Copyright 2004, Oracle. All rights reserved.

Wizards

Report Wizard Data Wizard Graph Wizard Report Block Wizard

Copyright 2004, Oracle. All rights reserved.

Report Editor

Data Model Web Source Paper Layout Paper Design Paper Parameter Form

Copyright 2004, Oracle. All rights reserved.

PL/SQL Development Environment: Syntax Palette

Copyright 2004, Oracle. All rights reserved.

Object Navigator

Copyright 2004, Oracle. All rights reserved.

Report-Level Objects

Properties Triggers PL/SQL Program Units Attached Libraries

Copyright 2004, Oracle. All rights reserved.

Data Model Objects

Parameters Queries Groups Columns Data Links

Copyright 2004, Oracle. All rights reserved.

Paper Layout Objects

Frames Repeating frames Fields Boilerplate

Copyright 2004, Oracle. All rights reserved.

Paper Parameter Form Objects

Fields Boilerplate

Copyright 2004, Oracle. All rights reserved.

Object Interrelationship
1
Select
...

2 3

Copyright 2004, Oracle. All rights reserved.

Customizing Your Oracle Reports Developer Session

Copyright 2004, Oracle. All rights reserved.

Saving Preferences

Copyright 2004, Oracle. All rights reserved.

Oracle Reports Environment Variables

REPORTS_PATH REPORTS_TMP REPORTS_RESOURCE ORACLE_PATH REPORTS_CLASSPATH

Windows: Modify in Registry

Copyright 2004, Oracle. All rights reserved.

Using the Online Help System

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Describe the Oracle Reports executables List the types of modules you can create in Reports Builder Describe the views of the Report Editor Describe the main object categories in a report module

Copyright 2004, Oracle. All rights reserved.

Practice 3 Overview

Invoking Reports Builder Opening an existing report Switching views in the Report Editor Accessing the Help system

Copyright 2004, Oracle. All rights reserved.

Creating a Paper Report

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Create a simple tabular paper report using the Report Wizard Describe the methods of building the report query Summarize report values Modify the style and content of a report Create other report styles available in the Report Wizard Preview a paper report on the Web

Copyright 2004, Oracle. All rights reserved.

Report Module Components

Data Model Web Source Paper Layout Paper Parameter Form Program Units

Copyright 2004, Oracle. All rights reserved.

Building a Paper Report

You have two options: Use Reports Builder


Wizards Paper Layout Paper Design

Define the report in XML

Copyright 2004, Oracle. All rights reserved.

Invoking the Report Wizard

Copyright 2004, Oracle. All rights reserved.

Choosing the Layout Type

Wizard Pages Report Style Data Source Type Data Source Definition Fields Totals Labels Template

Copyright 2004, Oracle. All rights reserved.

Creating a Tabular Report

Wizard Pages Report Style Data Source Type Data Source Definition Fields Totals Labels Template

Copyright 2004, Oracle. All rights reserved.

Selecting the Data Source Type

Copyright 2004, Oracle. All rights reserved.

Using Query Builder

Copyright 2004, Oracle. All rights reserved.

Building a Query

Copyright 2004, Oracle. All rights reserved.

Building a Query

Copyright 2004, Oracle. All rights reserved.

Query Builder Functions

User-friendly interface: Alternative to writing SQL syntax


1 2 3 4

6 5

Copyright 2004, Oracle. All rights reserved.

Selecting Displayed Fields

Copyright 2004, Oracle. All rights reserved.

Totals and Labels

Copyright 2004, Oracle. All rights reserved.

Selecting a Report Template


Enforce corporate standards Create professional-looking paper reports easily

Copyright 2004, Oracle. All rights reserved.

Viewing the Paper Report Output


2 1

Copyright 2004, Oracle. All rights reserved.

Saving the Report Definition

Save changes frequently.


File > Save

File > Save As...

xxx.rdf

yyy.rdf

Copyright 2004, Oracle. All rights reserved.

Reentering the Wizard

Select Tools > Report Wizard. Tabs are different for each report style. Wizard preserves all previous settings.

Copyright 2004, Oracle. All rights reserved.

Creating a New Report

Copyright 2004, Oracle. All rights reserved.

Creating Break Reports

Break report styles:


Group Left, Group Above

Additional wizard page:


Groups

Copyright 2004, Oracle. All rights reserved.

Break Report Labels


Group Left

Location Id xxxx

Department Name xxxxxx

Last Name Job Id xxxx xxxxxxx xxxxx xxxx

Group Above

Location Id

xxxx xxxxxx Job Id xxxxx xxxx

Department Name Last Name xxxx xxxxxxx

Copyright 2004, Oracle. All rights reserved.

Creating Mailing Labels and Letters

Wizard pages: Style Data Text Template

Copyright 2004, Oracle. All rights reserved.

Creating a Matrix Report

Three additional wizard pages: Matrix rows Matrix columns Matrix cells

Copyright 2004, Oracle. All rights reserved.

Previewing a Paper Report in a Browser

Use Insert > Bookmark to create a bookmark for your break report

Use File > Generate to File

Copyright 2004, Oracle. All rights reserved.

Previewing a Paper Report in a Browser

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Create paper reports with the Report Wizard Build queries using the Query Builder Apply templates to paper reports Modify reports by reentering the wizard Create new reports of different styles Preview a paper report on the Web

Copyright 2004, Oracle. All rights reserved.

Practice 4 Overview

Creating a Tabular report Modifying the report to create a Group Above break report Creating a Form Letter Creating a Matrix report Creating a Matrix with Group report

Copyright 2004, Oracle. All rights reserved.

Enhancing a Basic Paper Report

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the Paper Design view Modify the display of report data in the Paper Design view Modify the positioning of report data Highlight data using conditional formatting Add page numbering and the current date

Copyright 2004, Oracle. All rights reserved.

What Is the Paper Design?

The Paper Design is a view of report output that allows live editing of text and paper layout attributes: True WYSIWYG report editing Easy editing: See it. Click it. Change it. Cached report data

Copyright 2004, Oracle. All rights reserved.

The Paper Design Window


1 2 3

4
Copyright 2004, Oracle. All rights reserved.

Modifying a Report

Common modifications: Align columns Set format masks Manipulate objects Edit text Modify visual attributes Highlight data using conditional formats Insert page numbers and current date

Copyright 2004, Oracle. All rights reserved.

Aligning Columns

Point and select

Select Align Right

Copyright 2004, Oracle. All rights reserved.

Setting a Format Mask

Change format masks from the stylebar

Copyright 2004, Oracle. All rights reserved.

Manipulating Objects

Clear fields Move fields Resize fields

Flex Mode adjusts layout during changes.

Copyright 2004, Oracle. All rights reserved.

Modifying Visual Attributes

Modify text colors and fonts Edit text Set fill, patterns, and colors Use the Parent Frame tool to select an enclosing object
-Sales Report Year 1993 1993 1993 Year 1994 1994 Region Sales Americas 200 Europe 400 Asia Pacific 770 Region Americas Europe Sales 210 390 Sales Report by Area Year 1993 1993 1993 Year 1994 1994 Region Sales Americas 200 Europe 400 Asia Pacific 770 Region Americas Europe Sales 210 390 Sales Report by Area Year 1993 1993 1993 Year 1994 1994 Region Sales

Americas 200 Europe 400 Asia Pacific 770 Region Americas Europe Sales 210 390

Copyright 2004, Oracle. All rights reserved.

Applying Conditional Formatting

Copyright 2004, Oracle. All rights reserved.

Inserting Page Numbers, Dates, and Times


Inserted easily Customizable extensions

Copyright 2004, Oracle. All rights reserved.

Customizing Dates

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Enhance report output using live data:
Move, resize, delete objects Edit text Alter fonts, colors, and patterns Apply format masks Add page numbering and current date

Save report to preserve changes

Copyright 2004, Oracle. All rights reserved.

Practice 5 Overview

Modifying reports by applying changes in the Paper Design view

Copyright 2004, Oracle. All rights reserved.

Managing Report Templates

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the template regions Describe the difference between default and override template sections Modify a predefined report template Register a customized template Add a Web link to a template

Copyright 2004, Oracle. All rights reserved.

Using Report Templates

For paper reports, you have three template options: Predefined User-defined No template

Installation templates in: <oracle_home>\reports\templates

Copyright 2004, Oracle. All rights reserved.

Modifying a Template
Margin Body

Copyright 2004, Oracle. All rights reserved.

Customizing the Template Margin

Include objects such as: Images Text Page Numbers Date

Copyright 2004, Oracle. All rights reserved.

Customizing the Template Body

Copyright 2004, Oracle. All rights reserved.

Adding Web Links to a Template for Report HTML Output

Copyright 2004, Oracle. All rights reserved.

Predefining Your Own Templates

Modify and save template file (mytemp.tdf) Move file to template directory: <oracle_home>\reports\templates> Register name and description in cagprefs.ora
Reports.Tabular_Template_File = (rwbeige, rwblue, mytemp, rwgray, rwgreen, rwpeach, Reports.Tabular_Template_Desc = ("Beige", "Blue", "My Template Description", "Gray", "Green", "Peach",

Copyright 2004, Oracle. All rights reserved.

Adding a Template Preview Image

Image area is 200 x 150 pixels Image filenames = template name + .bmp Move .bmp files to template directory

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Modify existing templates to create your own userdefined template Modify the default section for all styles or override for individual style changes Add your templates to the predefined list Display an image for a predefined template Add Web links for report HTML output

Copyright 2004, Oracle. All rights reserved.

Practice 6 Overview

Customizing an existing template Applying the modified template to an existing report Adding a Web link

Copyright 2004, Oracle. All rights reserved.

Creating a Web Report

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Identify the options for designing a Web page Create a simple Web report using the Report Wizard Invoke the Web Source view of the Report Editor Describe the elements of the Web source code Preview a Web report Identify supported image formats for Web reports

Copyright 2004, Oracle. All rights reserved.

What Is JSP Technology?

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

Copyright 2004, Oracle. All rights reserved.

JSP Advantages

Separation of dynamic and static content Support for scripting and tags Reuse of components and tags Portable, powerful, and easy to use Accepted industry standard for building dynamic Web pages

Copyright 2004, Oracle. All rights reserved.

Simple JSP Example

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

Copyright 2004, Oracle. All rights reserved.

Building a Web Report

Two Options: Open an existing HTML page in Reports Builder Use one of the predefined HTML templates shipped with Oracle Reports Developer

Copyright 2004, Oracle. All rights reserved.

Using the Report Wizard

Copyright 2004, Oracle. All rights reserved.

Report Editor: Web Source View


Reports JSP Custom Tag Library Start of report

Data model information HTML template information

End of report

Copyright 2004, Oracle. All rights reserved.

JSP Tags

Standard JSP Tags


taglib page

Reports Custom JSP Tags


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

Copyright 2004, Oracle. All rights reserved.

Web Source Example

Copyright 2004, Oracle. All rights reserved.

Generating Output

Copyright 2004, Oracle. All rights reserved.

Image Format Support

Source Image Formats: JPG, JPEG GIF PNG BMP TIFF CGM Progressive JPEG Exif JPEG

Destination Image formats: JPG, JPEG GIF PNG BMP

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Create a Web report using the Report Wizard and a predefined HTML template Identify and describe standard and Reports custom JSP tags Use the Run Web Layout feature to test Web deployment

Copyright 2004, Oracle. All rights reserved.

Practice 7 Overview

Creating Web reports using the Report Wizard Examining the Web source code Modifying a Web report using the Report Wizard

Copyright 2004, Oracle. All rights reserved.

Enhancing Reports Using the Data Model: Queries and Groups

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the Data Model objects Modify query properties Modify the report hierarchy Change the order of data in a group Eliminate data from a report

Copyright 2004, Oracle. All rights reserved.

The Data Model Objects

Copyright 2004, Oracle. All rights reserved.

Modifying Properties of a Query

Copyright 2004, Oracle. All rights reserved.

Modifying Properties of a Query

Modify SQL query statement:


Add, rename, or delete columns Use column and table aliases Remove or modify schema name

Syntax error checks occur when:


Exiting SQL query statement Compiling or executing a report

Copyright 2004, Oracle. All rights reserved.

More Properties

Aid maintenance and testing: Rename queries in complex reports Add comments to describe queries:
Use the Comment property -- comment for single lines /*comment*/ for multiple lines

Set Maximum Rows to Fetch to restrict data

Copyright 2004, Oracle. All rights reserved.

Applying Changes

Update the paper layout and Web source to reflect changes in the Data Model. For paper reports:
Select Report Wizard. Alter the necessary tabbed pages.

The Wizard destroys previous layout and creates new objects. For Web reports:
Select the Report Wizard and navigate through each of the tabbed pages, reselecting the desired options. or Edit the Web source manually.
Copyright 2004, Oracle. All rights reserved.

Changing the Group Structure

Groups determine hierarchy and frequency. Wizard creates default groups.


Default naming conventions You can change query name. You can change group name.

Developer-created groups for:


Control break reports Complex matrix reports

Copyright 2004, Oracle. All rights reserved.

Group Hierarchy

Copyright 2004, Oracle. All rights reserved.

Ordering Data in a Group

1 2 3

Copyright 2004, Oracle. All rights reserved.

Query Modifications

In a break report, data order is determined by: Break order columns in the break groups Columns that you specify in the ORDER BY clause
SELECT d.department_id, d.department_name, e.last_name... FROM employees e, departments d WHERE e.department_id = d.department_id ORDER BY 2, e.salary

Copyright 2004, Oracle. All rights reserved.

Filtering Data in a Group

Copyright 2004, Oracle. All rights reserved.

Using a Packaged Filter

Reports Developer provides two packaged filters: First: Retrieves the first <n> records for the group Last: Retrieves the last <n> records for the group

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Identify Data Model objects Modify query properties Modify the report hierarchy by creating additional groups Filter data in a group

Copyright 2004, Oracle. All rights reserved.

Practice 8: Overview

Modifying report hierarchy Restricting records in a query Restricting records with a packaged filter

Copyright 2004, Oracle. All rights reserved.

Enhancing Reports Using the Data Model: Data Sources

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the various data source types Create reports using pluggable data sources Create supplemental rows of data by adding queries Reuse PL/SQL code to create a REF cursor Link data from multiple data sources using a data link

Copyright 2004, Oracle. All rights reserved.

Data Source Types

Access data from a variety of sources: SQL-based XML Oracle OLAP JDBC Express Text

Copyright 2004, Oracle. All rights reserved.

Pluggable Data Sources


Text files

Express JDBC

OLAP

SQL

XML

Oracle Reports
Client Oracle10g

Copyright 2004, Oracle. All rights reserved.

Out-of-the-Box Options

Copyright 2004, Oracle. All rights reserved.

Using XML as a Data Source

Copyright 2004, Oracle. All rights reserved.

Example: XML Data Stream

Copyright 2004, Oracle. All rights reserved.

XML Report

Copyright 2004, Oracle. All rights reserved.

OLAP Data Source

Multidimensional objects OLAP database

Copyright 2004, Oracle. All rights reserved.

Defining an OLAP Query

Copyright 2004, Oracle. All rights reserved.

Example: OLAP Report

Copyright 2004, Oracle. All rights reserved.

Using Text as a Data Source

Copyright 2004, Oracle. All rights reserved.

Setting Up the textpds.conf File

Copyright 2004, Oracle. All rights reserved.

Defining a Text Query

Copyright 2004, Oracle. All rights reserved.

Sample Text PDS Report

Copyright 2004, Oracle. All rights reserved.

Using JDBC as a Data Source

JDBC data source

Copyright 2004, Oracle. All rights reserved.

Configuring the jdbcpds.conf File

Copyright 2004, Oracle. All rights reserved.

Defining a JDBC Query

Copyright 2004, Oracle. All rights reserved.

Defining a JDBC Query

Copyright 2004, Oracle. All rights reserved.

Adding New Data

1 5 6 7 2 3 4

Copyright 2004, Oracle. All rights reserved.

Adding New Data

Copyright 2004, Oracle. All rights reserved.

Using REF Cursor Queries

Copyright 2004, Oracle. All rights reserved.

Viewing Output from Multiple Query Reports

Copyright 2004, Oracle. All rights reserved.

Using Data Links


Equijoin
DEPARTMENTS Department_Id 90 100 Department_Name Executive Finance Last_Name DeHaan Department_Id = Department_Id Faviet 100 Greenberg Department_Id 90 100 EMPLOYEES

Copyright 2004, Oracle. All rights reserved.

Using Data Links

Compound join:
Multicolumn primary or foreign key Define multiple equijoins

Nonequijoin:
Primary key value between two other values Create two links: employees.salary >= job_grades.lowest_sal employees.salary <= job_grades.highest_sal

Copyright 2004, Oracle. All rights reserved.

Creating a Column-to-Column Link

Copyright 2004, Oracle. All rights reserved.

Other Data Link Methods

Other methods of forming a link: Manual: Using a WHERE clause to form the link (SQL queries + column objects) Manual: Using parameters to form the link (REF cursor queries) Automatic: Using primary/foreign key constraints to form the link (SQL queries)

Copyright 2004, Oracle. All rights reserved.

Efficiency Issues: Multiple- or SingleQuery Hierarchy


Outer joins Data ratio Multitier environment

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Publish data from any source using the Pluggable Data Source feature Add additional queries using the Data Wizard Publish a report with data returned from a REF cursor query Create a relationship between data in different queries using a data link Design the data model to be most efficient

Copyright 2004, Oracle. All rights reserved.

Practice 9 Overview

Creating a second query in an existing report Creating a data link Creating a report using a pluggable data source Creating a report containing a REF cursor query

Copyright 2004, Oracle. All rights reserved.

Enhancing Reports Using the Data Model: Creating Columns

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe various Data Model columns Display the contents of a file Identify characteristics of user-defined columns Create report summaries and subtotals Derive data using a formula column Create and populate a placeholder

Copyright 2004, Oracle. All rights reserved.

Data Model Columns


5

2 3 4

Copyright 2004, Oracle. All rights reserved.

Maintaining Data Source Columns

Read-only properties

Copyright 2004, Oracle. All rights reserved.

Producing File Content Output

Copyright 2004, Oracle. All rights reserved.

Creating a Column
Summary column

What type of value? Choose the correct column tool

Formula column Placeholder column

What frequency? Create in a group or at report level

C_xxx

C_xxx

C_xxx

Copyright 2004, Oracle. All rights reserved.

Creating Summary Columns

Specific properties:
Function Source Reset At Compute At

Data type depends on Source data type Page summaries: Not supported in the wizard

Copyright 2004, Oracle. All rights reserved.

Displaying Subtotals
Reset At: G_DEPARTMENT Report

Copyright 2004, Oracle. All rights reserved.

Displaying Percentages
Reset At: G_EMPLOYEE Compute At: G_DEPARTMENT G_EMPLOYEE Report

Copyright 2004, Oracle. All rights reserved.

Resetting Summary Values

Data Model Group REPORT G_DEPARTMENT G_EMPLOYEE

Reset At REPORT Grand Total Running Total Running Total G_DEPARTMENT G_EMPLOYEE XXXX Sub Total Running Total XXXX XXXX Record Total

Copyright 2004, Oracle. All rights reserved.

Creating a Formula Column

Performs a user-defined computation Executes a PL/SQL function Must return a value Can be Character, Number, or Date Returned value must match data type
function CF_SALCALCFormula return Number is begin return(my_function(:salary)); end;

Copyright 2004, Oracle. All rights reserved.

Creating a Placeholder Column

CP_xxx

An empty container at design time Populated by another object at run time


Before Report trigger Formula column at report level Formula column in same group or below placeholder

CF_xxx

Copyright 2004, Oracle. All rights reserved.

Populating a Placeholder Column

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Identify column types and their uses Create Summary columns Define valid summary levels in a report Specify column properties based on required output:
Reset At: Resets to zero Compute At: % of Total only

Create Formula columns to return values Create Placeholder columns to hold values

Copyright 2004, Oracle. All rights reserved.

Practice 10 Overview

Creating a new report with summaries Adding summary calculations to an existing report Creating a new report with ranking summary columns Adding placeholders for highest and lowest values

Copyright 2004, Oracle. All rights reserved.

Enhancing Reports Using the Paper Layout

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Identify the paper report sections Design multipanel reports Mail a report Distribute a report to various destinations Describe the layout objects and relationships Modify an existing paper report layout Create variable length lines

Copyright 2004, Oracle. All rights reserved.

Viewing the Paper Layout


Header section

Compensation Report

Copyright 2004, Oracle. All rights reserved.

Viewing the Paper Layout


Header section

Compensation Report

Page 1 of 1
Main section

Copyright 2004, Oracle. All rights reserved.

Viewing the Paper Layout


Header section

Compensation Report

Page 1 of 1
Main section

Trailer section

End of report

Copyright 2004, Oracle. All rights reserved.

Viewing the Section Areas


Header section Body/ Margin

Compensation Report

Page 1 of 1
Main section Body/ Margin

Trailer section

End of report

Body/ Margin

Copyright 2004, Oracle. All rights reserved.

Designing Multipanel Reports


Logical Page 1 Panel 1 Physical Page 1 Logical Page 1 Panel 2 Physical Page 2 Logical Page 1 Panel 1 Physical Page 3 Logical Page 1 Panel 3 Physical Page 5 Logical Page 1 Panel 1 Physical Page 7 Logical Page 1 Panel 2 Physical Page 4 Logical Page 1 Panel 4 Physical Page 6

Header

Main

Trailer

Copyright 2004, Oracle. All rights reserved.

Printing Multipanel Reports

Page 1-1

Page 1-2

Page 2-1

Page 2-2

Logical horizontal panels = 2

Copyright 2004, Oracle. All rights reserved.

Different Objects in the Paper Layout

4 5 1 2 3 6

Copyright 2004, Oracle. All rights reserved.

The Paper Layout Layers

F_xxx R_G_xxx M_G_xxx Body

F_xxx

Layers of a tabular report

Copyright 2004, Oracle. All rights reserved.

Avoiding Layout Errors

Confine Mode

Flex Mode

Copyright 2004, Oracle. All rights reserved.

Report Processing
BEGIN M_G_master REPEAT R_G_master

f_xxx

f_xxx

BEGIN M_G_detail REPEAT R_G_detail

f_xxx

f_xxx

f_xxx
END M_G_detail

END M_G_master

Copyright 2004, Oracle. All rights reserved.

Creating Layout Objects

The tool palette contains: Standard GUI drawing tools Frame, repeating frame, field objects Other layout objects

2 3 4 5
Copyright 2004, Oracle. All rights reserved.

7 8 9

Paper Layout Tools

Pin a tool: Double-click Shift key for constrained objects Magnify Frame Select Report Block

Copyright 2004, Oracle. All rights reserved.

Report Bursting

Header e-mail

Copyright 2004, Oracle. All rights reserved.

Report Bursting

Body PDF

Copyright 2004, Oracle. All rights reserved.

Report Bursting

Trailer HTML

Copyright 2004, Oracle. All rights reserved.

Report Bursting
Dept 10
West East

Dept 20
West East

;
Dept 30
West East

Dept 40

Dept 80

Copyright 2004, Oracle. All rights reserved.

Bursting on a Repeating Group

Copyright 2004, Oracle. All rights reserved.

Bursting on a Repeating Group


Setting the Repeat On property

Copyright 2004, Oracle. All rights reserved.

Creating an Additional Layout

Copyright 2004, Oracle. All rights reserved.

Distributing a Report

Copyright 2004, Oracle. All rights reserved.

Distributing a Report

Copyright 2004, Oracle. All rights reserved.

Tracing the Report Distribution

Copyright 2004, Oracle. All rights reserved.

Creating Variable Length Lines

Flex lines adjust to fit variable frames and repeating frames.

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to modify the Paper Layout using: Report sections Layout objects and tools Report mailing, bursting, and distribution features Variable length lines

Copyright 2004, Oracle. All rights reserved.

Practice 11 Overview

Using report sections Adding a repeating frame to the header page Adding flexible lines Distributing a report

Copyright 2004, Oracle. All rights reserved.

Controlling the Paper Layout: Common Properties

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Identify common paper layout properties Modify common paper layout properties Explain the use of format triggers Modify Web Settings properties

Copyright 2004, Oracle. All rights reserved.

Modifying Paper Layout Object Properties

Accessing a Property Inspector: Object Navigator:


Select object Double-click node icon
abc

Paper Design or Paper Layout view:


Use Select Parent Frame tool Select Tools > Property Inspector

Copyright 2004, Oracle. All rights reserved.

Comparing Properties
Intersection Pin

Copyright 2004, Oracle. All rights reserved.

Common Layout Properties

Four objects with common properties: Frames Repeating Frames Fields Boilerplate Objects Some common properties affect: Sizing Pagination Frequency of display

Copyright 2004, Oracle. All rights reserved.

Sizing Objects
Layout icons Elasticity Vertical Horizontal

fixed

expand

contract variable

Copyright 2004, Oracle. All rights reserved.

Anchors

Objects in the push path have implicit anchors (not visible in Paper Layout)

Explicit anchors override implicit anchors All anchors appear in Object Navigator
Implicit (shaded) Explicit (solid)

Copyright 2004, Oracle. All rights reserved.

Layout Object Relationships

1 2

Copyright 2004, Oracle. All rights reserved.

Layout Object Relationships

4 1 2 3 6 5

Copyright 2004, Oracle. All rights reserved.

Pagination Icons in the Paper Layout

Copyright 2004, Oracle. All rights reserved.

Using Page Break Before


-11

Copyright 2004, Oracle. All rights reserved.

Using Page Break Before


-11 xxx xxx -2-

Copyright 2004, Oracle. All rights reserved.

Using Page Break Before


-11 xxx xxx -2-

-12

Copyright 2004, Oracle. All rights reserved.

Using Page Break Before


-11 xxx xxx -2-

-12 xxx xxx -2-

Copyright 2004, Oracle. All rights reserved.

Using Page Break After


xxx xxx -1-

-12 xxx xxx -2-

Copyright 2004, Oracle. All rights reserved.

Using Page Protect

f_dept_id Employee f_ename

Copyright 2004, Oracle. All rights reserved.

Using Page Protect


-1-

f_dept_id Employee

40 xxxxxxxx xxxxxxxx

-2f_ename 41 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx

Copyright 2004, Oracle. All rights reserved.

Controlling Print Frequency


-1Your Company Your Company -2Your Company -3Your Company

Print Object On = All Pages Base Printing On = Enclosing Object

Copyright 2004, Oracle. All rights reserved.

Using Format Triggers

Copyright 2004, Oracle. All rights reserved.

Layout Object Properties for Web Support

Hyperlink Hyperlink Destination Bookmark Application Command Line

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Identify common properties for most layout objects:
Size Pagination Print frequency Format trigger Web settings

Modify common properties for special reporting needs

Copyright 2004, Oracle. All rights reserved.

Practice 12 Overview

Creating a break report with continuation pages displaying limited information Modifying properties for object Web support

Copyright 2004, Oracle. All rights reserved.

Controlling the Paper Layout: Specific Properties

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Identify specific layout properties Modify specific layout properties Explain the use of specific properties Create a file link Specify the format order for the report sections Enable cataloguing and searching of PDF output

Copyright 2004, Oracle. All rights reserved.

Properties of a Repeating Frame

Copyright 2004, Oracle. All rights reserved.

Specifying Print Direction


1 2 3

Copyright 2004, Oracle. All rights reserved.

Controlling the Number of Records per Page


1
-1-2-3-2-

2
-1-

Copyright 2004, Oracle. All rights reserved.

Controlling Spacing Between Records


Mailing Labels

1 2

Copyright 2004, Oracle. All rights reserved.

Minimum Widow Records


Without widow control Page 1

Page 2

Copyright 2004, Oracle. All rights reserved.

Minimum Widow Records


Without widow control Page 1 With widow control (Min Widow Records = 3) Page 1

Page 2

Page 2

Copyright 2004, Oracle. All rights reserved.

Column Mode
Column Mode Off
Page 1

10

20

Page 2

20

30

Copyright 2004, Oracle. All rights reserved.

Column Mode
Column Mode Off
Page 1

Column Mode On
Page 1

10

20

10

20

30

Page 2

Page 2

20

30

20

Copyright 2004, Oracle. All rights reserved.

Properties of a Field

Fields define formatting attributes and logic Wizard creates a field for each column You create additional fields in the Paper Layout:
Source: Column, parameter, or system variable Format mask: Standard Oracle format symbols

Copyright 2004, Oracle. All rights reserved.

System Variables

Copyright 2004, Oracle. All rights reserved.

Page Numbering
Page 4 of 4 Example 1 Page 3 of 4 Page 2 of 4 Page 1 of 4 Report Title Example 2 End

Page 1 of 1 Page 2 of 2 Page 1 of 2 Report Title

End

Copyright 2004, Oracle. All rights reserved.

Valid Source Columns

G_Region R_Region F_1 G_Dept R_Dept R_Emp

G_Emp

F_REPORT

Copyright 2004, Oracle. All rights reserved.

Displaying File Contents

Copyright 2004, Oracle. All rights reserved.

When Are the Contents Updated?

Reports Builder reads the file contents when you: Modify the Property Inspector Open a report definition Run a report

Copyright 2004, Oracle. All rights reserved.

Linking and Importing Files


1

Copyright 2004, Oracle. All rights reserved.

Linking and Importing Files


1 2 Import

Link

Copyright 2004, Oracle. All rights reserved.

Linking and Importing Files


1 2 Import

Link 3

Copyright 2004, Oracle. All rights reserved.

Linking and Importing Files


1 2 Import

Link 3 4

Copyright 2004, Oracle. All rights reserved.

Comparing a File Link and a File Column

Q_EMP

G_EMP PICTURE 1 F_PICTURE

Copyright 2004, Oracle. All rights reserved.

Specifying the Format Order

Copyright 2004, Oracle. All rights reserved.

PDF Document Taxonomy Properties

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Identify object-specific properties Modify these properties when necessary Create a file link in your report Modify the default format order for report sections Specify taxonomy properties for PDF documents

Copyright 2004, Oracle. All rights reserved.

Practice 13 Overview

Modifying the printing of a mailing label report Controlling the number of records on a page Adding a file link to a report Ensuring all details of a master print on the same page

Copyright 2004, Oracle. All rights reserved.

Web Reporting

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Identify the attributes of a high quality Web report Describe the JavaServer Page run-time environment Describe static and dynamic Web reporting Add dynamic content to a Web page Identify Reports custom JSP tags Customize Web reports

Copyright 2004, Oracle. All rights reserved.

High Quality Web Publishing

Copyright 2004, Oracle. All rights reserved.

Comparing Static and Dynamic Reporting

Copyright 2004, Oracle. All rights reserved.

Adding Dynamic Content

Report Block Wizard Graph Wizard <body>

</body> Data Model Web Source JavaServer Page (JSP)

Copyright 2004, Oracle. All rights reserved.

Creating a Report Block

Copyright 2004, Oracle. All rights reserved.

Invoking the Report Block Wizard

Copyright 2004, Oracle. All rights reserved.

Examining the Web Source Code


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 2004, Oracle. All rights reserved.

Examining the Web Source Code

Copyright 2004, Oracle. All rights reserved.

rw:foreach Tag

... <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 2004, Oracle. All rights reserved.

rw:field 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 2004, Oracle. All rights reserved.

Customizing Reports JSPs

Modify the classes in the style sheet Use HTML tags and attributes Use Reports custom tags

Copyright 2004, Oracle. All rights reserved.

Customizing Reports JSPs Using Style Sheets


<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 2004, Oracle. All rights reserved.

Customizing Reports JSPs Using HTML Tags and Attributes

<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 2004, Oracle. All rights reserved.

Customizing Reports JSPs Using Reports Custom Tags


Tag attributes provide additional formatting functionality. Example: rw:field tag optional attributes: breakLevel breakValue nullValue containsHtml formatMask formatTrigger

Copyright 2004, Oracle. All rights reserved.

Customizing Reports JSPs Using Reports Custom Tags


<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 2004, Oracle. All rights reserved.

Customizing Reports JSPs Using Reports Custom Tags

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Create a Web report using an existing HTML page and the Report Block Wizard Describe the structure of a Reports JSP and identify key custom JSP tags Use style sheets to customize Web reports Use HTML attributes and Reports custom tag attributes to customize Web reports

Copyright 2004, Oracle. All rights reserved.

Practice 14 Overview

Adding dynamic content to an existing Web page Customizing a Web report using JSP tag attributes

Copyright 2004, Oracle. All rights reserved.

Extending Functionality Using XML

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the benefits of XML definitions Create XML report definitions Apply XML report definitions Debug XML report definitions

Copyright 2004, Oracle. All rights reserved.

Why Use XML Report Definitions?

Apply run-time customizations Perform batch updates Build fully functional reports Product openness

Copyright 2004, Oracle. All rights reserved.

Creating XML Report Definitions

<report> <data> . . . </data> <layout> . . . </layout> </report>

XML tags Partial definition Full definition

Copyright 2004, Oracle. All rights reserved.

Partial Report Definitions: Format Modification Example


<report> <data> </data> <layout> <section> <field .../> ... </section> </layout> </report>

Empty <data> tag Use of <layout> Use of <field>

Copyright 2004, Oracle. All rights reserved.

Partial Report Definitions: Format Exception Example


Empty <data> tag Use of <exception> Use of <condition>

<report> <layout> <section> <field ...> <exception> <condition .../> </exception> </field> </section> </layout> </report>

Copyright 2004, Oracle. All rights reserved.

Full Report Definition: Data Model Modification Example


<report> <data> <dataSource> ... </dataSource> </data> <layout> </layout> </report>

Empty <layout> tag Use of <dataSource> Column aliases Bind references

Copyright 2004, Oracle. All rights reserved.

Running XML Report Definitions

Apply to an .rdf or .xml file


rwclient userid=... report=... customize=....xml server=... destype=... desformat=...

One or multiple definitions

Copyright 2004, Oracle. All rights reserved.

Running XML Report Definitions

Before Form or After Form trigger


SRW.APPLY_DEFINITION(....xml);

Run by itself Batch updates


rwconverter source="(...)" dest=... customize=... batch=yes

Copyright 2004, Oracle. All rights reserved.

Debugging XML Report Definitions

XML parser Tracing option Using Reports Builder

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Use XML report definitions:
Run-time customizations Batch updates

Apply XML definitions Debug XML definitions

Copyright 2004, Oracle. All rights reserved.

Practice 15 Overview

Creating an XML report definition Applying a run-time customization Debugging an XML definition

Copyright 2004, Oracle. All rights reserved.

Creating and Using Report Parameters

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Create and reference a parameter Create a list of values for parameter input Use and modify a system parameter Build a Paper Parameter Form layout Customize a Paper Parameter Form layout Use HTML parameter form extensions

Copyright 2004, Oracle. All rights reserved.

Creating User Parameters

Restrict values in a WHERE clause


SELECT CUST_LAST_NAME, ACCOUNT_MGR_ID FROM CUSTOMERS WHERE ID = <a value>

Substitute any part of a SELECT statement


SELECT CUST_LAST_NAME, ACCOUNT_MGR_ID FROM CUSTOMERS <a where clause>

Substitute a single column or expression


SELECT <a column/expression> FROM CUSTOMERS

Copyright 2004, Oracle. All rights reserved.

Creating User Parameters

Copyright 2004, Oracle. All rights reserved.

Referencing Parameters in a Report Query


Bind reference replaces a value:
:parameter_name

Lexical reference replaces a clause:


&parameter_name

Copyright 2004, Oracle. All rights reserved.

Using Bind References

Restrict values in a WHERE clause


SELECT CUST_LAST_NAME, ACCOUNT_MGR_ID FROM CUSTOMERS WHERE CUSTOMER_ID > :P_CUST

Substitute a single value or expression in the select statement


SELECT CUST_LAST_NAME, ACCOUNT_MGR_ID FROM CUSTOMERS ORDER BY DECODE( :SORT, 1, CUST_LAST_NAME, , 2, NLS_TERRITORY, ACCOUNT_MGR_ID)
Copyright 2004, Oracle. All rights reserved.

Using Lexical References

Use to substitute any part of the query.


SELECT CUST_LAST_NAME, ACCOUNT_MGR_ID FROM CUSTOMERS &P_WHERE_CLAUSE &P_ORD_CLAUSE SELECT CUST_LAST_NAME, ACCOUNT_MGR_ID FROM CUSTOMERS &P_WHERE_ORD_CLAUSE SELECT FROM &P_CUSTNAME CUST, &P_ACCTMGR MGR &P_TABLE

Make sure that the number and data types match at run time.
Copyright 2004, Oracle. All rights reserved.

Hints and Tips When Referencing Parameters


Always do the following: Specify column aliases when substituting column names Create lexical parameters explicitly in the Object Navigator Enter an initial value for parameters that affect query validation when NULL

Copyright 2004, Oracle. All rights reserved.

Creating a List of Values

Static list of values


1

2 4 5

Copyright 2004, Oracle. All rights reserved.

Creating a List of Values

Dynamic list of values


1 3 4 2 5

Copyright 2004, Oracle. All rights reserved.

Referencing System Parameters

Copyright 2004, Oracle. All rights reserved.

Building a Paper Parameter Form

+ Report properties: Width Height Number of Pages

Copyright 2004, Oracle. All rights reserved.

Customizing a Paper Parameter Form

Copyright 2004, Oracle. All rights reserved.

Using Parameter Form HTML Extensions

Boilerplate text with HTML tags Parameter fields with JavaScript Parameter Form header Parameter Form footer

Copyright 2004, Oracle. All rights reserved.

Parameter Form Header and Footer

Header

Footer

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Define and use bind and lexical parameters Create a list of values Reference system parameters Modify parameter values at run time, using:
Command line arguments Run-time parameter form

Create a run-time paper parameter form:


Build it using the Parameter Form Builder Customize it using the Report Editor, HTML

Copyright 2004, Oracle. All rights reserved.

Practice 16 Overview

Modifying an existing report to use a bind parameter Adding a dynamic list of values Adding a lexical parameter Adding a static list of values Creating a customized parameter form

Copyright 2004, Oracle. All rights reserved.

Embedding a Graph in a Report

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Create and display a simple graph Customize a graph in a Web report Modify graph data dynamically Specify additional graph attributes using Graph.XML Use graph hyperlinks

Copyright 2004, Oracle. All rights reserved.

Adding a Graph to a Paper Report

Copyright 2004, Oracle. All rights reserved.

Adding a Graph to a Web Report

Copyright 2004, Oracle. All rights reserved.

Adding a Graph to a Web Report

Copyright 2004, Oracle. All rights reserved.

Selecting the Graph Type

Copyright 2004, Oracle. All rights reserved.

Selecting the Graph Data

Copyright 2004, Oracle. All rights reserved.

Adding Options to the Graph

Copyright 2004, Oracle. All rights reserved.

Customizing Web Graphs


<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 2004, Oracle. All rights reserved.

The rw:graph Tag

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="column-list"] [width="size"] [height="size"] [graphHyperlink="link"] tag body </rw:graph>

Copyright 2004, Oracle. All rights reserved.

Customizing Graphs Using the Graph.XML File

Copyright 2004, Oracle. All rights reserved.

Using Graph Hyperlinks

Document on same machine Any destination Any URL

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Build a new graph by invoking the Graph Wizard to build and embed a graph in a paper report Customize a graph in a Web report using the rw:graph tag Customize graphs using the Graph.XML file Use a graph hyperlink for drilling down

Copyright 2004, Oracle. All rights reserved.

Practice 17 Overview

Using the Graph Wizard to create a graph Altering the graph in the Graph Wizard Creating graphs that print once for each record of a group Adding a graph to a Web layout Customizing a graph in a Web report

Copyright 2004, Oracle. All rights reserved.

Enhancing Matrix Reports

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Design a matrix Data Model Design a matrix Paper Layout Modify a matrix structure Create and modify matrix summaries Create a matrix with group report Create a nested matrix report

Copyright 2004, Oracle. All rights reserved.

The Matrix Data Model

Copyright 2004, Oracle. All rights reserved.

The Matrix Paper Layout

Job Title Dept Name F_department_na

F_job_id Sumsalary F_Sumsalary

Copyright 2004, Oracle. All rights reserved.

Creating Matrix Summaries

F_CITY

Job Title Dept Name


F_name

F_job_id Sumsalary F_Sumsalary


F_SumsalaryPerJOB_I F_SumsalaryPerDEPT

F_SumsalaryPerCITY

F_SumsalaryPer

Copyright 2004, Oracle. All rights reserved.

Creating the Matrix Manually

Using the Data Wizard:


Select the Matrix query check box Step through the wizard

Entirely manual:
Select the appropriate query tool Create extra groups Create the cross product group

Copyright 2004, Oracle. All rights reserved.

The Matrix with Group Data Model

Copyright 2004, Oracle. All rights reserved.

The Matrix with Group Layout

Region:

F_CITY

Job Title Dept Name F_department

F_job_id Sumsalary Total: F_Sumsalary


F_SumsalaryPerTITLE F_SumsalaryPerDEPA

F_SumsalaryPerCITY

Total:

F_SumsalaryPer

Copyright 2004, Oracle. All rights reserved.

Building a Nested Matrix

Copyright 2004, Oracle. All rights reserved.

Building a Nested Matrix

Copyright 2004, Oracle. All rights reserved.

Building a Nested Matrix

Copyright 2004, Oracle. All rights reserved.

Nested Matrix Paper Layout

Copyright 2004, Oracle. All rights reserved.

Creating Nested Matrix Summaries

F_SumSALARY

F_SumSALPerDEPA

F_Sum_CITY

F_SumSALPerJOB_

Copyright 2004, Oracle. All rights reserved.

Displaying Zeros

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Create matrix reports with the Report Wizard Describe the relationship between the data and layout in a cross product structure Identify and describe matrix-specific elements:
Cross product group Product Order property Matrix layout object

Copyright 2004, Oracle. All rights reserved.

Practice 18 Overview

Opening and changing an existing matrix report Building a nested matrix report Adding summaries to a nested matrix report Displaying zeros for summary values and restricting columns per page Displaying more meaningful column information and rotating the text

Copyright 2004, Oracle. All rights reserved.

Coding PL/SQL Triggers

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the different types of triggers Describe sample uses of triggers Write and reference common code Create a PL/SQL library Publish a report as a result of a database event

Copyright 2004, Oracle. All rights reserved.

Types of Triggers in Reports

Report:
Five triggers Report Triggers node in Object Navigator

Data Model:
Formula (column) Filter (group) Parameter validation

Layout: Format trigger on most objects

Copyright 2004, Oracle. All rights reserved.

Trigger Code

Boolean: true false

Character Number Date

Copyright 2004, Oracle. All rights reserved.

Using Report Triggers


Before Parameter Form 1 F After Parameter Form Before Report F page1 F

If readonly=yes

If > 1 page Between Pages F page2 After Report

Copyright 2004, Oracle. All rights reserved.

Using Report Triggers

After Parameter Form


Example: Build dynamic WHERE clause
FUNCTION AfterPForm RETURN BOOLEAN IS BEGIN IF :p_customer IS NULL THEN :p_where_clause := ' '; ELSE :p_where_clause := 'where id >= :p_customer'; END IF; RETURN(TRUE); END;

Query syntax
SELECT CUSTOMER_ID, CUSTOMER_NAME FROM CUSTOMERS &p_where_clause ORDER BY CUSTOMER_NAME
Copyright 2004, Oracle. All rights reserved.

Using Data Model Triggers: PL/SQL Group Filter


Restrict records in a group Perform PL/SQL for each record
FUNCTION G_empGroupFilter RETURN BOOLEAN IS BEGIN IF :department_name = 'Operations' AND :salary > 5000 THEN RETURN(my_function); ELSE RETURN(TRUE); END IF; END;

PL/SQL filters result in all records being fetched

Copyright 2004, Oracle. All rights reserved.

Using Data Model Triggers: Parameter Validation


Example: Do not allow report output to be sent directly to a printer.
FUNCTION DESTYPEValidTrigger RETURN BOOLEAN IS BEGIN IF :DESTYPE = 'Printer' THEN RETURN(FALSE); ELSE RETURN(TRUE); END IF; END;

You cannot reassign values to parameters or columns in this trigger.

Copyright 2004, Oracle. All rights reserved.

Using Layout Triggers

Format triggers: Exist on most layout objects Can suppress an entire layout section (master group frame): No records fetched Can suppress the display of individual records (repeating frame): All records fetched

Copyright 2004, Oracle. All rights reserved.

Using a Format Trigger on a Frame


Displaying a Text String in Place of Column Headings
Dept: 10 Dept: f_deptno Name Name Salary No employees in this department Dept: 40 No employees in this department 2 Salary

Copyright 2004, Oracle. All rights reserved.

Using a Format Trigger on a Repeating Frame


Dynamically Altering the Display of Records
Employee Details Employee Details King f_name f_date f_salary f_name f_date King Kochhar 2 1 De Haan 3
Copyright 2004, Oracle. All rights reserved.

17-JUN-87 24000

Kochhar 21-SEP-89 17000 De Haan 13-JAN-93 17000 Employee Details 17-JUN-87 21-SEP-89 13-JAN-93

Using a Format Trigger on a Field


Dynamically Hiding Fields
Employee Details f_name f_date f_salary Employee Details King 17-JUN-87 24000 1

Kochhar 21-SEP-89 17000 De Haan 13-JAN-93 17000 Employee Details King 17-JUN-87

Kochhar 21-SEP-89 De Haan 13-JAN-93

Copyright 2004, Oracle. All rights reserved.

Using a Format Trigger in a Web Layout


<tbody> <rw:foreach id="R_G_DEPARTMENT_ID_1" src="G_DEPARTMENT_ID"> <tr> <td <rw:headers id="HFSALARY" src="HBSALARY"/> class="OraCellNumber"> <rw:field id="F_SALARY" src="SALARY" nullValue="&nbsp;" formatMask="$999,999.00" formatTrigger="mystyles"> F_SALARY </rw:field> </td> </tr> </rw:foreach> </tbody>

Copyright 2004, Oracle. All rights reserved.

Using a Format Trigger on a Boilerplate Object


Insert Spacing Between Groups of Records
f_1 f_2 1 3 FUNCTION spacing RETURN BOOLEAN IS BEGIN IF MOD(:count_column, 3) = 0 THEN RETURN(TRUE); ELSE RETURN(FALSE); END IF; END;
Copyright 2004, Oracle. All rights reserved.

f_3

Writing Common Code

At the Report level: Object Navigator, Program Units Menu: Program > PL/SQL Editor In a library: Object Navigator, PL/SQL Library File > New: Create new library File > Open: Add to existing library Attach library to report

Copyright 2004, Oracle. All rights reserved.

Event-Based Reporting

Implemented through PL/SQL stored procedures Uses include:


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

Copyright 2004, Oracle. All rights reserved.

Event-Driven Publishing API


Oracle PL/SQL Workflow Advanced Queuing

Output
Client

Data model

Data interface

Reports Services

Reports Cache

E-mail File Printer

Copyright 2004, Oracle. All rights reserved.

Invoking a Report from a Database Event

Create a database trigger Include a parameter list with the required entries:
GATEWAY SERVER REPORT USERID

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Select the appropriate trigger type for your requirement: Report, Data Model, or Layout Identify the trigger and code needed for:
Building a dynamic WHERE clause Validating a parameter value Dynamically altering record display Suppressing null fields

Use Report-level program units and create PL/SQL libraries for common code Invoke a report from a database event

Copyright 2004, Oracle. All rights reserved.

Practice 19 Overview

Creating a format trigger to display different paper layouts conditionally Creating and using a report-level PL/SQL function Creating an using an external PL/SQL library Creating a PL/SQL group filter

Copyright 2004, Oracle. All rights reserved.

Extending Functionality Using the SRW Package

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the package contents Output messages at run time Execute a drill-down report Create a simple table of contents Create and populate temporary tables Modify visual attributes dynamically

Copyright 2004, Oracle. All rights reserved.

Contents of the SRW Package

SRW.SET_BOOKMARK SRW.SET_FONT_STYLE

SRW.DO_SQL SRW.RUN_REPORT

SRW.SET_MAXROW SRW.MESSAGE

SRW.TRACE_START SRW.PROGRAM_ABORT

Copyright 2004, Oracle. All rights reserved.

Outputting Messages

Warning:
WHEN <exception> THEN SRW.MESSAGE (999, Warning: report continues);

Error:
WHEN <exception> THEN SRW.MESSAGE (999, Warning: report terminated); RAISE SRW.PROGRAM_ABORT;

Exceptions:
SRW.INTEGER_ERROR SRW.NULL_ARGUMENTS

Copyright 2004, Oracle. All rights reserved.

Executing a Nested Report


1 KING.LIS xxx xxxxxxx xxx xxxxxxx 2

KING KOCHHAR DE HAAN

KOCHHAR.LIS yyy yyyyyyy yyy yyyyyyy

DE HAAN.LIS zzz zzzzzzz zzz zzzzzzz

SRW.RUN_REPORT

Copyright 2004, Oracle. All rights reserved.

Executing a Nested Report

Example:
SRW.RUN_REPORT ('Report=EMPS DESTYPE=FILE DESNAME='||:LAST_NAME||'.LIS BATCH=YES MGRNO='||TO_CHAR(:MANAGER_ID));

Exceptions:
SRW.RUN_REPORT_FAILURE SRW.RUN_REPORT_BATCHNO

Function: SRW.GETERR_RUN

Copyright 2004, Oracle. All rights reserved.

Restricting Data

Before Report trigger SRW.SET_MAXROW('Q_EMP',3);

Q_EMP EMPLOYEE_ID LAST_NAME G_EMP EMPLOYEE_ID LAST_NAME 100 101 102 KING KOCHHAR DE HAAN

Copyright 2004, Oracle. All rights reserved.

Initializing Fields
Output: logical page no. = 2

Paper Layout Page: F_NEWPAGE

Page: 5

1 FUNCTION F_LOGICAL_PAGEFormatTrigger RETURN BOOLEAN IS my_page number; BEGIN SRW.GET_PAGE_NUM(my_page); SRW.SET_FIELD_NUM(0,my_page+3); RETURN(TRUE); END;

Copyright 2004, Oracle. All rights reserved.

Creating a Table of Contents

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 2004, Oracle. All rights reserved.

Performing DDL Statements

Example:
SRW.DO_SQL('CREATE TABLE SRW_LOG (RPT_NAME VARCHAR2(40), REC_NUM NUMBER, MSG_TEXT VARCHAR2(80))' ); SRW.DO_SQL('INSERT INTO SRW_LOG (RPT_NAME, REC_NUM, MSG_TEXT) VALUES (''PAY_REPORT'', TO_CHAR(:EMPLOYEE_ID), :LAST_NAME||''PAY REPORT RUN'') ');

Exception: SRW.DO_SQL_FAILURE

Copyright 2004, Oracle. All rights reserved.

Setting Format Attributes

Tuesday, January 2004

Borderwidth Fill pattern Format mask

Printer tray control

Car Policy

Define a bookmark

Copyright 2004, Oracle. All rights reserved.

Setting Format Attributes

Visual attributes: SRW.SET_FILL_PATTERN('solid'); SRW.SET_BORDER_WIDTH(250); SRW.SET_FORMAT_MASK('Day, Month yyyy'); Printer tray control: SRW.SET_PRINTER_TRAY('letterhead'); Defining a bookmark: SRW.SET_BOOKMARK('Car Policy');

Copyright 2004, Oracle. All rights reserved.

Using Format Attributes in a Web Layout


<rw:field id="F_SALARY" src="SALARY. . . formatTrigger="mystyles"> F_SALARY </rw:field>

FUNCTION mystyles RETURN BOOLEAN IS BEGIN SRW.SET_JUSTIFICATION(SRW.RIGHT_HJUST); SRW.SET_TEXT_COLOR('Red'); SRW.SET_FONT_WEIGHT(SRW.BOLD_WEIGHT); SRW.SET_FONT_STYLE(SRW.ITALIC_STYLE); return (TRUE); END;

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Describe the SRW package contents:
Procedures Functions Exceptions

Use SRW.PROGRAM_ABORT to stop report processing Use the SRW package to:
Execute a detail report Create a table of contents Dynamically execute DDL statements Provide conditional layout formatting and display

Copyright 2004, Oracle. All rights reserved.

Practice 20 Overview

Building a report containing conditional highlighting Modifying a Web report with conditional highlighting Executing a detail report from a master report Writing to a temporary table from a report

Copyright 2004, Oracle. All rights reserved.

Maximizing Performance Using OracleAS Reports Services

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe the OracleAS Reports Services architecture Distinguish between the JSP and Servlet run-time architectures Describe the various ways to run a report List the options for managing and monitoring OracleAS Reports Services

Copyright 2004, Oracle. All rights reserved.

Running Reports Using OracleAS Reports Services


Provides the deployment platform Formats, prints reports on a powerful server Eliminates rerunning reports Enhances scalability and performance

Copyright 2004, Oracle. All rights reserved.

Report Request Methods

RWCLIENT command line URL syntax OracleAS Portal SRW.RUN_REPORT Event-Driven Publishing API

Copyright 2004, Oracle. All rights reserved.

Oracle Application Server Components


Web Services

System Management

Security and Identity

Enterprise Portal

Application Development Framework Business Intelligence Application server Grid Computing Infrastructure Integration Broker Management

Portal

Any Data Source

Mobile and Wireless

Packaged Application

Oracle Application Server 10g


Business Intelligence B2B

Copyright 2004, Oracle. All rights reserved.

Enabling Single Sign-On Access


Oracle Internet Directory

Log in only once Access application level authentication Access data level authentication

Copyright 2004, Oracle. All rights reserved.

Running the Web Layout: JSP Run-time Architecture

HTTP Oracle HTTP Listener mod_OC4J JSP Engine CORBA/IIOP OracleAS Reports Services CORBA/IIOP Reports Engine PDS

rept.jsp OID

Copyright 2004, Oracle. All rights reserved.

Running the Paper Layout: Servlet Run-time Architecture


HTTP Oracle HTTP Listener mod_OC4J Reports Servlet OID CORBA/IIOP OracleAS Reports Services CORBA/IIOP rept.rdf rept.jsp Reports Engine PDS

Fax

t rin P

ma il

Copyright 2004, Oracle. All rights reserved.

Running a Paper Report on the Web

URL syntax:
http://vesuvius.world.com:8888/reports/rwservlet? report=emp_dept.rdf&desformat=html&destype=cache& server=repsrv1&dept_param=10

Key map file: cgicmd.dat

Copyright 2004, Oracle. All rights reserved.

Running a Report from the Command Line

SERVER = <server_name> MODULE|REPORT = <runfile> DESTYPE = FILE, PRINTER, MAIL, CACHE, LOCALFILE, SYSOUT,ORACLEPORTAL DESNAME = <desname> DESFORMAT = PDF, HTML, HTMLCSS, RTF, DELIMITED, XML
RWCLIENT SERVER=server1 MODULE=my_rep.rdf DESTYPE=cache DESFORMAT=html

Copyright 2004, Oracle. All rights reserved.

The OUTPUTIMAGEFORMAT Parameter

Commands that can use OUTPUTIMAGEFORMAT:

rwclient

rwrun rwbuilder rwservlet rwcgi

Syntax:

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

Copyright 2004, Oracle. All rights reserved.

The Schedule Parameter

SCHEDULE = [FREQ from] TIME [retry n after LEN]


RWCLIENT... SCHEDULE=monthly_last_weekday_from_17:00_Nov_22,_2003_ retry_3_after_1_hour

FREQ

CLOCK

DATE

TIME

Copyright 2004, Oracle. All rights reserved.

Reports Caching

Cached reports on server: Tolerance = n (minutes) Tolerance = 0 (default/current behavior) Maximum tolerance is 232 minutes (approximately 10,000 years) Cached output controlled by a CACHEDIR server parameter

Copyright 2004, Oracle. All rights reserved.

Using Oracle Enterprise Manager

Copyright 2004, Oracle. All rights reserved.

Using Oracle Enterprise Manager

Copyright 2004, Oracle. All rights reserved.

Using Oracle Enterprise Manager

Copyright 2004, Oracle. All rights reserved.

Managing and Monitoring OracleAS Reports Services


Start, stop, and restart a Reports server View and manage:
Current Jobs queue Scheduled Jobs queue Finished Jobs queue

Monitor server performance Edit server configuration

Copyright 2004, Oracle. All rights reserved.

What Is the Queue Manager?

Real-time Reports Server status: View report status and scheduled jobs Refresh to see the up-to-date status Reprioritize or cancel jobs

Administrator password encrypted in .conf file

Copyright 2004, Oracle. All rights reserved.

Queue Manager
Past jobs Current jobs Scheduled jobs

Copyright 2004, Oracle. All rights reserved.

Queue Manager
All my jobs All jobs Refresh

Copyright 2004, Oracle. All rights reserved.

Using the Queue Manager


RSVR1 Queue Manager RSVR2

Connect to any number of servers Administrator can shut down server Reports Services restores scheduled jobs after shutdown

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Describe the JSP and servlet run-time architectures List several ways to run a report Describe the features of Oracle Enterprise Manager and Queue Manager for monitoring Reports Services

Copyright 2004, Oracle. All rights reserved.

Practice 21 Overview

Constructing a URL to run a report on the Web Creating an entry in the key map file

Copyright 2004, Oracle. All rights reserved.

Building Reports: Efficiency Guidelines

Copyright 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: Describe performance areas Use performance measuring tools Build reports to run in other languages

Copyright 2004, Oracle. All rights reserved.

Tuning Reports

No absolute rules Investigate specific areas:


Data Model Paper Layout Web Layout and JSP report definitions Run-time arguments

Copyright 2004, Oracle. All rights reserved.

Performance Measurement

Measurement tool: Trace option Server and network measurements: SQL Trace Traffic and bandwidth

Copyright 2004, Oracle. All rights reserved.

Non SQL Data Sources

Copyright 2004, Oracle. All rights reserved.

Investigating the Data Model

Schema design Indexes Efficient SQL Efficient PL/SQL Calculations

Redundant queries Break groups Group filters Linking queries

Copyright 2004, Oracle. All rights reserved.

Investigating the Paper Layout

Frames Object size Format triggers Fetching ahead Bursting and distribution

Copyright 2004, Oracle. All rights reserved.

Running the Report

RUNDEBUG=NO Array processing LONGCHUNK PARAMFORM Batch processing

Copyright 2004, Oracle. All rights reserved.

Different Development and Run-Time Environments


Reports Builder development
Bitmapped only

Reports Builder Runtime


Bitmapped MODE = bitmap Character mode MODE = character

Copyright 2004, Oracle. All rights reserved.

Developing Reports to Run in Different GUIs


Use common fonts or map fonts in uifont.ali Use common colors Be aware of dots per inch (DPI)

Copyright 2004, Oracle. All rights reserved.

Setting NLS Language Environment Variables


NLS_LANG DEVELOPER_NLS_LANG, USER_NLS_LANG
NLS_LANG=French_France.WE8DEC

Unicode:
NLS_LANG=<lang>_<territory>.UTF8

Copyright 2004, Oracle. All rights reserved.

Translating an Oracle Reports Application

Use TranslationHub to translate messages and text defined as part of the application. Consider: Format masks Hard-coded strings Multiple character sets

Copyright 2004, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: Use performance measuring tools Describe the facilities for running reports in other languages

Copyright 2004, Oracle. All rights reserved.

Practice 22 Overview

Identifying areas to investigate for tuning reports Using the trace facility Interpreting time statistics Improving performance

Copyright 2004, Oracle. All rights reserved.