Post on 04-Mar-2015
Oracle Reports Developer 10g: Build Reports
Electronic Presentation
D17075GC10Production 1.0June 2004D39524
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 Data-General, 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 warrantthat 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.
AuthorsEllen GravinaSmitha Keshav
Technical Contributors and ReviewersCem AyberkinChristian BauwensAlena Bugarova Kathryn CunninghamLaurent DereacMark FlemingWarren LordMarcelo ManzanoDarren McBurneyPaul NarthDaphne NougierMiyuki OhsatoLigia Jasmin RobayoJim SafcikRie SaitohNavneet SinghSarah SpicerMartijn van der BruggenVanessa WangPhilipp WeckerleTed Witiuk
Publisher
Sujatha Nagendra
Copyright © 2004, Oracle. All rights reserved.
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
XML
Discoverer Server Reports Server
Copyright © 2004, Oracle. All rights reserved.
WebApplication
Server
Data ServerAnyClient
Enterprise Reporting
• Provides access for more users to vital customized information
• Lowers cost of ownership• Uses integrated business intelligence
Copyright © 2004, Oracle. All rights reserved.
Reporting
Ad hoc query
Advancedanalysis
Application ServerData Server
Web Client
Enterprise Reporting
Copyright © 2004, Oracle. All rights reserved.
Web Publishing
GIF89a
hyperlinks
JavaScript
Copyright © 2004, Oracle. All rights reserved.
Paper Publishing
8.5”
11”
GIF89a
hyperlinks
JavaScript
Copyright © 2004, Oracle. All rights reserved.
Oracle Reports Developer
Publish data from any source, in any format, to any destination with high fidelity.
TEXT
<Your Data Source>
OLAP
JDBC
XML
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
Packaged Apps
Oracle DB Non-Oracle
Wireless
Browser
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 Architecturefor the Web
Oracle HTTP Listenermod_OC4J
JSP Engine
OracleAS Reports Services
CORBA/IIOP
ReportsEngine
PDS
HTTP
CORBA/IIOP
Oracle Internet Directory
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 or Paper
Web featuresSecurity
ChartsDrill down
Copyright © 2004, Oracle. All rights reserved.
Designing Reports
Before you start development, consider:
Specification
Structure
Style
Publishing Medium
Data retrievalCommon features
Copyright © 2004, Oracle. All rights reserved.
ProductNumber Description Price
List of Products
Tabular
Copyright © 2004, Oracle. All rights reserved.
Master-Detail
Customer Name
Product Number Price
Customer Name
Product Number Price
Outstanding Customer Items
Copyright © 2004, Oracle. All rights reserved.
Master with Two Details
Customer
Outstanding Items
Orders in Last Six Months
Total Value
Product Number Price
Order No. Date
Customer Statistics
Copyright © 2004, Oracle. All rights reserved.
Matrix
Product ID
Customer
Customer Matrix
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
12
3
Copyright © 2004, Oracle. All rights reserved.
Print Preview
1 2 3
4
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 Services
Reports Builderrwbuilder
Reports Serverrwserver
Reports Runtimerwrun
Reports Converterrwconverter
Queue Manager rwrqm
Reports Clientrwclient
Reports CGI rwcgi
Reports Servlet rwservlet
Copyright © 2004, Oracle. All rights reserved.
Invoking Reports Builder
Copyright © 2004, Oracle. All rights reserved.
Reports Builder Modules
Report PL/SQL LibraryTemplate
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
1 2
3
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 SQLsyntax
6
5
2 3 41
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
1
2
Copyright © 2004, Oracle. All rights reserved.
Saving the Report Definition
Save changes frequently.
File > Save
xxx.rdf
File > Save As...
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
2 1
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
Location Id Department Name Last Name Job Id
xxxx xxxxxx xxxx xxxxx xxxxxxx xxxx
Group Above
Group Left
Location Id xxxx
Department Name xxxxxxLast Name Job Id
xxxx xxxxxxxxxxxx xxxx
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
3
4
2
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
1 2 3 4 5
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 Region Sales1993 Americas 2001993 Europe 4001993 Asia Pacific 770
Year Region Sales1994 Americas 2101994 Europe 390
Sales Report by Area
Year Region Sales1993 Americas 2001993 Europe 4001993 Asia Pacific 770
Year Region Sales1994 Americas 2101994 Europe 390
Sales Report by Area
1993 Americas 2001993 Europe 4001993 Asia Pacific 770
1994 Americas 2101994 Europe 390
Year Region Sales
Year Region Sales
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 PaperDesign 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
BodyMargin
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 user-
defined 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
End of report
HTML template information
Data model information
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
Destination Image formats:• JPG, JPEG• GIF• PNG• BMP
Source Image Formats:• JPG, JPEG• GIF• PNG• BMP• TIFF• CGM• Progressive JPEG• Exif JPEG
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 Fetchto 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
1
2
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 dWHERE e.department_id = d.department_idORDER 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
Oracle Reports
Client Oracle10g
OLAP SQLTextfiles
Express JDBC XML
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
OLAP database
Multidimensional objects
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
4
5
6
1
2
3
7
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
Department_Id
90
100
Department_Name
Executive
FinanceLast_Name
DeHaan
Greenberg
Faviet
Department_Id
90
100
100
DEPARTMENTS
EMPLOYEES
Department_Id =
Department_Id
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_salemployees.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 Single-Query 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
4
5
1
2
3
Copyright © 2004, Oracle. All rights reserved.
Maintaining Data Source Columns
Read-onlyproperties
Copyright © 2004, Oracle. All rights reserved.
Producing File Content Output
Copyright © 2004, Oracle. All rights reserved.
Creating a Column
• What type of value? Choose the correct column tool
• What frequency? Create in a group or at report level
C_xxxC_xxx
C_xxxC_xxx
C_xxxC_xxx
Summary column
Formula column
Placeholder column
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 SubtotalsReset At:
G_DEPARTMENT Report
2
1
Copyright © 2004, Oracle. All rights reserved.
Displaying Percentages
Reset At: G_EMPLOYEECompute At: G_DEPARTMENT
G_EMPLOYEEReport
2
1
Copyright © 2004, Oracle. All rights reserved.
Resetting Summary Values
REPORT
Grand Total
Running Total
Running Total
Data Model Group
REPORT
G_DEPARTMENT
G_EMPLOYEE
Reset At
G_DEPARTMENT
XXXX
Sub Total
Running Total
G_EMPLOYEE
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 isbeginreturn(my_function(:salary));
end;
Copyright © 2004, Oracle. All rights reserved.
Creating a Placeholder Column
• 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
CP_xxx
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
CompensationReport
Header section
Copyright © 2004, Oracle. All rights reserved.
Viewing the Paper Layout
CompensationReport
Header section
Main section
Page 1 of 1
Copyright © 2004, Oracle. All rights reserved.
Viewing the Paper Layout
CompensationReport
Header section
Main section
Page 1 of 1
End of reportTrailer section
Copyright © 2004, Oracle. All rights reserved.
Viewing the Section Areas
Body/ Margin
CompensationReport
Header section
End of reportTrailer section
Main section
Page 1 of 1Body/
Margin
Body/ Margin
Copyright © 2004, Oracle. All rights reserved.
Designing Multipanel Reports
Logical Page 1Panel 1Physical Page 1Logical Page 1Panel 2Physical Page 2
Logical Page 1Panel 1Physical Page 3
Logical Page 1Panel 4Physical Page 6
Logical Page 1Panel 2Physical Page 4
Logical Page 1Panel 3Physical Page 5
Logical Page 1Panel 1Physical Page 7
Header
Main
Trailer
Copyright © 2004, Oracle. All rights reserved.
Printing Multipanel Reports
Logical horizontal panels = 2
Page 1-2
Page 2-2
Page 1-1
Page 2-1
Copyright © 2004, Oracle. All rights reserved.
Different Objects in the Paper Layout
123
45
6
Copyright © 2004, Oracle. All rights reserved.
Body
The Paper Layout Layers
M_G_xxx
R_G_xxx
F_xxx 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
f_xxx f_xxx f_xxx
f_xxx f_xxx
BEGIN M_G_master…
REPEAT R_G_master
BEGIN M_G_detail
REPEAT R_G_detail
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
1
2345
789
6
Copyright © 2004, Oracle. All rights reserved.
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
;
West East
Dept 10
Dept 20
Dept 30
Dept 40
Dept 80
…
West East
West East
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.
abc
Modifying Paper Layout Object Properties
Accessing a Property Inspector:• Object Navigator:
– Select object– Double-click node icon
• Paper Design or Paper Layout view:– Use Select Parent Frame tool– Select Tools > Property Inspector
abc
Copyright © 2004, Oracle. All rights reserved.
Comparing PropertiesIntersection 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
Elasticity
Layout icons
Vertical Horizontal
fixed
expand
contract
variable
Copyright © 2004, Oracle. All rights reserved.
• Objects in the push path have implicit anchors (not visible in Paper Layout)
• Explicit anchors override implicit anchors• All anchors appear in Object Navigator
Anchors
Implicit (shaded)
Explicit (solid)
Copyright © 2004, Oracle. All rights reserved.
Layout Object Relationships
1
3
2
Copyright © 2004, Oracle. All rights reserved.
Layout Object Relationships
12
63
4
5
Copyright © 2004, Oracle. All rights reserved.
Pagination Icons in the Paper Layout
Copyright © 2004, Oracle. All rights reserved.
Using Page Break Before
-1-
1
Copyright © 2004, Oracle. All rights reserved.
Using Page Break Before
-1-
1
xxx xxx
-2-
Copyright © 2004, Oracle. All rights reserved.
Using Page Break Before
-1-
1
xxx xxx
-2-
2
-1-
Copyright © 2004, Oracle. All rights reserved.
Using Page Break Before
2
-1-
-1-
1
xxx xxx
-2-
xxx xxx
-2-
Copyright © 2004, Oracle. All rights reserved.
-1-
1
xxx xxx
Using Page Break After
-1-
2xxx xxx
-2-
Copyright © 2004, Oracle. All rights reserved.
Using Page Protect
f_dept_id
f_ename
Employee
Copyright © 2004, Oracle. All rights reserved.
f_dept_id
f_ename
Employee
Using Page Protect
40xxxxxxxxxxxxxxxx
-1-
41xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-2-
Copyright © 2004, Oracle. All rights reserved.
Controlling Print Frequency
Print Object On = All PagesBase Printing On = Enclosing Object
Your Company Your Company
-1-
Your Company
-2-
Your Company
-3-
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
3
2
1
Copyright © 2004, Oracle. All rights reserved.
1
Controlling the Number of Records per Page
-1-
-2-
-3-
2-1-
-2-
Copyright © 2004, Oracle. All rights reserved.
Controlling Spacing Between Records
Mailing Labels
1
2
Copyright © 2004, Oracle. All rights reserved.
Minimum Widow Records
Page 1
Page 2
Without widow control
Copyright © 2004, Oracle. All rights reserved.
Minimum Widow Records
Page 1
Page 2
With widow control(Min Widow Records = 3)
Page 1
Page 2
Without widow control
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
10 20
Page 2
20 30
Page 1
10 20 30
Page 2
20
Column Mode On
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
EndExample 1 Page 3 of 4
Page 2 of 4
Page 1 of 4
ReportTitle
EndPage 1 of 1
Page 2 of 2
Page 1 of 2
ReportTitle
Example 2
Copyright © 2004, Oracle. All rights reserved.
Valid Source Columns
G_Region
G_Dept
G_Emp
R_Region
R_Dept
R_Emp
F_REPORT
F_1
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
3
1 2
Import
Link
Copyright © 2004, Oracle. All rights reserved.
Linking and Importing Files
3 4
1 2
Import
Link
Copyright © 2004, Oracle. All rights reserved.
Comparing a File Link and a File Column
F_PICTURE
1
G_EMP
PICTURE
Q_EMP
2
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
Data ModelWeb Source
JavaServer Page (JSP)
<body>
</body>
Report Block WizardGraph Wizard
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
Data Model & Business Logic (XML)
Paper Layout (XML)
Web Layout (JSP)Graph (XML)
<%@ 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">
</rw:report>
<HTML>
</HTML>
</rw:objects>
<layout>
</layout>
Structure of a Reports JSP:
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=" "> 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=" "> F_EMPLOYEE_ID </rw:field></td>
.OraCellNumber { color: #000000; background-color: #f7f7e7; font-family: Arial, Helvetica, sans-serif; font-size: 10px ; text-align: right}
Copyright © 2004, Oracle. All rights reserved.
Customizing Reports JSPsUsing 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 JSPsUsing 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 JSPsUsing 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=" " formatMask="$999,999.00" > F_SALARY
</rw:field></td>
…</tr></rw:foreach> </tbody>
Copyright © 2004, Oracle. All rights reserved.
Customizing Reports JSPsUsing 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
• XML tags• Partial definition• Full definition
<report><data>. . .</data><layout>. . .</layout>
</report>
Copyright © 2004, Oracle. All rights reserved.
Partial Report Definitions: Format Modification Example
• Empty <data> tag • Use of <layout>• Use of <field>
<report><data></data><layout>
<section><field .../>...
</section></layout>
</report>
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
• Empty <layout> tag • Use of <dataSource>• Column aliases• Bind references
<report><data><dataSource>...</dataSource>
</data><layout></layout>
</report>
Copyright © 2004, Oracle. All rights reserved.
Running XML Report Definitions
• Apply to an .rdf or .xml file
• One or multiple definitions
rwclient userid=... report=...customize=....xml server=...destype=... desformat=...
Copyright © 2004, Oracle. All rights reserved.
Running XML Report Definitions
• Before Form or After Form trigger
• Run by itself• Batch updates
SRW.APPLY_DEFINITION(....xml);
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
• Substitute any part of a SELECT statement
• Substitute a single column or expression
SELECT CUST_LAST_NAME, ACCOUNT_MGR_IDFROM CUSTOMERSWHERE ID = <a value>
SELECT CUST_LAST_NAME, ACCOUNT_MGR_IDFROM CUSTOMERS<a where clause>
SELECTFROM CUSTOMERS
<a column/expression>
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:¶meter_name
Copyright © 2004, Oracle. All rights reserved.
Using Bind References
• Restrict values in a WHERE clause
• Substitute a single value or expression in the select statement
SELECT CUST_LAST_NAME, ACCOUNT_MGR_IDFROM CUSTOMERSWHERE CUSTOMER_ID > :P_CUST
SELECT CUST_LAST_NAME, ACCOUNT_MGR_IDFROM CUSTOMERSORDER BY DECODE( , 1, CUST_LAST_NAME,
2, NLS_TERRITORY, ACCOUNT_MGR_ID)
:SORT,
Copyright © 2004, Oracle. All rights reserved.
Using Lexical References
• Use to substitute any part of the query.
• Make sure that the number and data types match at run time.
SELECT CUST_LAST_NAME, ACCOUNT_MGR_IDFROM CUSTOMERS
SELECT CUST_LAST_NAME, ACCOUNT_MGR_IDFROM CUSTOMERS
SELECT FROM
&P_WHERE_CLAUSE
&P_ORD_CLAUSE
&P_WHERE_ORD_CLAUSE
&P_CUSTNAME CUST, &P_ACCTMGR MGR&P_TABLE
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
1
2 3
45
Static list of values
Copyright © 2004, Oracle. All rights reserved.
Creating a List of Values
1
2
3
4
5
Dynamic list of values
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.
<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;">
</rw:graph>
Graph XML
Customizing Web Graphs
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
1
2
3
4
Copyright © 2004, Oracle. All rights reserved.
The Matrix Paper Layout
F_job_id
Sumsalary
F_SumsalaryF_department_na
Job Title
Dept Name
1 2 3
Copyright © 2004, Oracle. All rights reserved.
Creating Matrix Summaries
F_job_id
Sumsalary
F_SumsalaryF_name
Job Title
Dept Name
F_SumsalaryPerJOB_I
F_SumsalaryPerDEPT
F_SumsalaryPerCITY
F_CITY
F_SumsalaryPer
2
1
3
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
Total:
F_job_id
Sumsalary
F_SumsalaryF_department
Job Title
Dept Name
F_SumsalaryPerTITLE
F_SumsalaryPerDEPA
F_SumsalaryPerCITY
F_CITY
Total: F_SumsalaryPer
Region:
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_SumSALPerJOB_
F_Sum_CITY
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
CharacterNumber
Date
Copyright © 2004, Oracle. All rights reserved.
Using Report Triggers
AfterParameter
Form
F
BeforeReport
1
BeforeParameter
Form
page1 BetweenPages
page2
If > 1 page
AfterReport
If readonly=yes2 3
F
F F
Copyright © 2004, Oracle. All rights reserved.
Using Report Triggers
• After Parameter FormExample: Build dynamic WHERE clause
• Query syntax
FUNCTION AfterPForm RETURN BOOLEAN ISBEGINIF :p_customer IS NULL THEN
:p_where_clause := ' ';ELSE
:p_where_clause := 'where id >= :p_customer';END IF;RETURN(TRUE);END;
SELECT CUSTOMER_ID, CUSTOMER_NAMEFROM CUSTOMERS
ORDER BY CUSTOMER_NAME&p_where_clause
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
• PL/SQL filters result in all records being fetched
FUNCTION G_empGroupFilter RETURN BOOLEAN ISBEGINIF :department_name = 'Operations' AND
:salary > 5000 THENRETURN(my_function);
ELSERETURN(TRUE);
END IF;END;
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.
• You cannot reassign values to parameters or columns in this trigger.
FUNCTION DESTYPEValidTrigger RETURN BOOLEAN ISBEGINIF :DESTYPE = 'Printer' THEN
RETURN(FALSE);ELSE
RETURN(TRUE);END IF;END;
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
Dept: f_deptno
No employees inthis department
Name Salary
Name Salary
Dept: 10
Dept: 40
No employees inthis department
2
1
Displaying a Text String in Place of Column Headings
Copyright © 2004, Oracle. All rights reserved.
Employee Details
1
Using a Format Trigger on a Repeating Frame
f_name f_date f_salary
f_name f_date
King 17-JUN-87 24000
Kochhar 21-SEP-89 17000
Employee Details
De Haan 13-JAN-93 17000
2
King 17-JUN-87
Kochhar 21-SEP-89
Employee Details
De Haan 13-JAN-93
3
Dynamically Altering the Display of Records
Copyright © 2004, Oracle. All rights reserved.
Using a Format Trigger on a Field
Employee Details
f_name f_date f_salaryKochhar 21-SEP-89 17000
Employee Details
De Haan 13-JAN-93 17000
King 17-JUN-87
Kochhar 21-SEP-89
Employee Details
De Haan 13-JAN-93
King 17-JUN-87 24000
2
1
Dynamically Hiding Fields
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=" " formatMask="$999,999.00" formatTrigger="mystyles"> F_SALARY
</rw:field></td>
…</tr></rw:foreach> </tbody>
Copyright © 2004, Oracle. All rights reserved.
f_1 f_2 f_3
Using a Format Trigger on a Boilerplate Object
FUNCTION spacing RETURN BOOLEAN ISBEGINIF MOD(:count_column, 3) = 0 THEN
RETURN(TRUE);ELSE
RETURN(FALSE);END IF;END;
2
1
Insert Spacing Between Groups of Records
3 4
Copyright © 2004, Oracle. All rights reserved.
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
Reports Services
Output Datamodel
Datainterface
OracleWorkflow
Client
Reports Cache
FilePrinter
PL/SQL AdvancedQueuing
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:
• Error:
• Exceptions:– SRW.INTEGER_ERROR– SRW.NULL_ARGUMENTS
WHEN <exception> THENSRW.MESSAGE (999, ‘Warning: report continues’);
WHEN <exception> THENSRW.MESSAGE (999, ‘Warning: report terminated’);
RAISE SRW.PROGRAM_ABORT;
Copyright © 2004, Oracle. All rights reserved.
Executing a Nested Report
KING
KOCHHAR
DE HAAN
KING.LIS
xxx xxxxxxxxxx xxxxxxx
2
SRW.RUN_REPORT
KOCHHAR.LIS
yyy yyyyyyyyyy yyyyyyy
DE HAAN.LIS
zzz zzzzzzzzzz zzzzzzz
1
Copyright © 2004, Oracle. All rights reserved.
Executing a Nested Report
• Example:
• Exceptions:– SRW.RUN_REPORT_FAILURE
– SRW.RUN_REPORT_BATCHNO
• Function: SRW.GETERR_RUN
SRW.RUN_REPORT('Report=EMPSDESTYPE=FILEDESNAME='||:LAST_NAME||'.LISBATCH=YESMGRNO='||TO_CHAR(:MANAGER_ID));
Copyright © 2004, Oracle. All rights reserved.
Restricting Data
Before Report triggerSRW.SET_MAXROW('Q_EMP',3);
Q_EMP
G_EMP
EMPLOYEE_IDLAST_NAME
EMPLOYEE_ID LAST_NAME
100 KING101 KOCHHAR102 DE HAAN
Copyright © 2004, Oracle. All rights reserved.
Initializing Fields
Paper Layout
FUNCTION F_LOGICAL_PAGEFormatTriggerRETURN BOOLEAN IS
my_page number;BEGIN
SRW.GET_PAGE_NUM(my_page);SRW.SET_FIELD_NUM(0,my_page+3);RETURN(TRUE);
END;
1
Output: logical page no. = 2
Page: F_NEWPAGE Page: 5
2
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:
• Exception: SRW.DO_SQL_FAILURE
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'') ');
Copyright © 2004, Oracle. All rights reserved.
Setting Format Attributes
BorderwidthFill patternFormat mask
Printer tray control
Define a bookmark
Tuesday, January 2004
Car Policy
Copyright © 2004, Oracle. All rights reserved.
Setting Format Attributes
• Visual attributes:
• Printer tray control:
• Defining a bookmark:
SRW.SET_FILL_PATTERN('solid');SRW.SET_BORDER_WIDTH(250);SRW.SET_FORMAT_MASK('Day, Month yyyy');
SRW.SET_PRINTER_TRAY('letterhead');
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 ISBEGINSRW.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 todo 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
Oracle Application Server 10g
Sys
tem
Man
agem
ent
Application Development Framework
BusinessIntelligence
IntegrationBroker
Portal
Sec
uri
ty a
nd
Iden
tity
Man
agem
ent
Application server
Grid Computing Infrastructure
WebServices
B2B
Any DataSource
Mobile and Wireless
EnterprisePortal
BusinessIntelligence
PackagedApplication
Copyright © 2004, Oracle. All rights reserved.
Enabling Single Sign-On Access
• Log in only once• Access application level authentication• Access data level authentication
Oracle Internet Directory
Copyright © 2004, Oracle. All rights reserved.
Running the Web Layout:JSP Run-time Architecture
Oracle HTTP Listenermod_OC4JJSP Engine
OracleAS Reports Services
CORBA/IIOP
ReportsEngine
PDS
HTTP
CORBA/IIOP
rept.jsp
OID
Copyright © 2004, Oracle. All rights reserved.
Running the Paper Layout:Servlet Run-time Architecture
Oracle HTTP Listenermod_OC4J
Reports Servlet
OracleAS Reports Services
CORBA/IIOP
ReportsEngine
PDS
rept.rdf
rept.jsp
HTTP
CORBA/IIOP
PrintFax
OID
Copyright © 2004, Oracle. All rights reserved.
Running a Paper Report on the Web
URL syntax:
Key map file: cgicmd.dat
http://vesuvius.world.com:8888/reports/rwservlet?report=emp_dept.rdf&desformat=html&destype=cache&server=repsrv1&dept_param=10
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
rwcgirwservletrwbuilderrwrunrwclient
Commands that can use OUTPUTIMAGEFORMAT:
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
• Connect to any number of servers• Administrator can shut down server• Reports Services restores scheduled jobs after
shutdown
Queue Manager
RSVR1
RSVR2
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 optionServer 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
Unicode:
NLS_LANG=French_France.WE8DEC
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