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

Oracle Reports Developer 10g: Build Reports

Student Guide Volume 1

D17075GC10 Production 1.0 June 2004 D39520

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 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 Education Products, Oracle Corporation, 500 Oracle Parkway, Box SB-6, Redwood Shores, CA 94065. Oracle Corporation does not warrant that this document is error-free. 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.

Contents
Preface I Introduction Course Objectives I-2 Course Content I-3 Introduction to Oracle Reports Developer Objectives 1-2 Business Intelligence 1-3 Enterprise Reporting 1-5 Web Publishing 1-9 Paper Publishing 1-10 Oracle Reports Developer 1-11 Benefits 1-12 Oracle 10g Products 1-13 Oracle Database 10g 1-14 Oracle Developer Suite 10g 1-15 Oracle Application Server 10g 1-18 Oracle Reports Developer 1-20 OracleAS Reports Services 1-22 OracleAS Reports Services Architecture for the Web 1-23 Summary 1-25 Designing and Running Reports Objectives 2-2 Understanding User Requirements 2-3 Designing Reports 2-5 Tabular 2-7 Master-Detail 2-8 Master with Two Details 2-9 Matrix 2-10 Retrieving and Sharing Data 2-11 Running a Report 2-13 Previewing Reports 2-15 Print Preview 2-16 Supported File Types 2-19 Summary 2-21 Practice 2 Overview 2-22 Working in Oracle Reports Developer Objectives 3-2 Reports Developer Executables 3-3 Invoking Reports Builder 3-5 Reports Builder Modules 3-6 Report Data and Layout 3-7 Reports Builder Components 3-8 Main Menu Structure 3-10 Wizards 3-12 Report Editor 3-13 PL/SQL Development Environment: Syntax Palette 3-15
iii

Object Navigator 3-16 Report-Level Objects 3-17 Data Model Objects 3-18 Paper Layout Objects 3-19 Paper Parameter Form Objects 3-20 Object Interrelationship 3-21 Customizing Your Oracle Reports Developer Session 3-22 Saving Preferences 3-23 Oracle Reports Environment Variables 3-24 Using the Online Help System 3-26 Summary 3-28 Practice 3 Overview 3-29 4 Creating a Paper Report Objectives 4-2 Report Module Components 4-3 Building a Paper Report 4-4 Invoking the Report Wizard 4-5 Choosing the Layout Type 4-6 Creating a Tabular Report 4-7 Selecting the Data Source Type 4-9 Using Query Builder 4-10 Building a Query 4-11 Query Builder Functions 4-12 Selecting Displayed Fields 4-14 Totals and Labels 4-15 Selecting a Report Template 4-16 Viewing the Paper Report Output 4-17 Saving the Report Definition 4-18 Reentering the Wizard 4-19 Creating a New Report 4-21 Creating Break Reports 4-22 Break Report Labels 4-23 Creating Mailing Labels and Letters 4-24 Creating a Matrix Report 4-26 Previewing a Paper Report in a Browser 4-28 Summary 4-30 Practice 4 Overview 4-31 Enhancing a Basic Paper Report Objectives 5-2 What Is the Paper Design? 5-3 The Paper Design Window 5-4 Modifying a Report 5-5 Aligning Columns 5-6 Setting a Format Mask 5-7 Manipulating Objects 5-9
iv

Modifying Visual Attributes 5-10 Applying Conditional Formatting 5-12 Inserting Page Numbers, Dates, and Times 5-14 Customizing Dates 5-16 Summary 5-17 Practice 5 Overview 5-18 6 Managing Report Templates Objectives 6-2 Using Report Templates 6-3 Modifying a Template 6-4 Customizing the Template Margin 6-6 Customizing the Template Body 6-7 Adding Web Links to a Template for Report HTML Output 6-8 Predefining Your Own Templates 6-10 Adding a Template Preview Image 6-12 Summary 6-13 Practice 6 Overview 6-14 Creating a Web Report Objectives 7-2 What Is JSP Technology? 7-3 JSP Advantages 7-4 Simple JSP Example 7-6 Building a Web Report 7-7 Using the Report Wizard 7-8 Report Editor: Web Source View 7-9 JSP Tags 7-11 Web Source Example 7-13 Generating Output 7-15 Image Format Support 7-17 Summary 7-19 Practice 7 Overview 7-20 Enhancing Reports Using the Data Model: Queries and Groups Objectives 8-2 The Data Model Objects 8-3 Modifying Properties of a Query 8-5 More Properties 8-8 Applying Changes 8-10 Changing the Group Structure 8-12 Group Hierarchy 8-14 Ordering Data in a Group 8-16 Query Modifications 8-18 Filtering Data in a Group 8-20

Using a Packaged Filter 8-21 Summary 8-22 Practice 8: Overview 8-23 9 Enhancing Reports Using the Data Model: Data Sources Objectives 9-2 Data Source Types 9-3 Pluggable Data Sources 9-5 Out-of-the-Box Options 9-6 Using XML as a Data Source 9-7 Example: XML Data Stream 9-9 Document Type Definition File 9-10 XML Report 9-11 OLAP Data Source 9-12 Defining an OLAP Query 9-13 Example: OLAP Report 9-14 Using Text as a Data Source 9-15 Setting Up the textpds.conf File 9-16 Defining a Text Query 9-18 Sample Text PDS Report 9-19 Using JDBC as a Data Source 9-20 Configuring the jdbcpds.conf File 9-21 Defining a JDBC Query 9-23 Adding New Data 9-25 Using REF Cursor Queries 9-28 Viewing Output from Multiple Query Reports 9-30 Using Data Links 9-32 Creating a Column-to-Column Link 9-34 Other Data Link Methods 9-36 Efficiency Issues: Multiple- or Single-Query Hierarchy 9-38 Summary 9-40 Practice 9 Overview 9-41

10 Enhancing Reports Using the Data Model: Creating Columns Objectives 10-2 Data Model Columns 10-3 Maintaining Data Source Columns 10-5 Producing File Content Output 10-7 Creating a Column 10-9 Creating Summary Columns 10-11 Displaying Subtotals 10-13 Displaying Percentages 10-15
vi

Resetting Summary Values 10-17 Creating a Formula Column 10-18 Creating a Placeholder Column 10-20 Populating a Placeholder Column 10-22 Summary 10-24 Practice 10 Overview 10-25 11 Enhancing Reports Using the Paper Layout Objectives 11-2 Viewing the Paper Layout 11-3 Viewing the Section Areas 11-5 Designing Multipanel Reports 11-6 Printing Multipanel Reports 11-8 Different Objects in the Paper Layout 11-9 The Paper Layout Layers 11-11 Avoiding Layout Errors 11-13 Report Processing 11-15 Creating Layout Objects 11-17 Paper Layout Tools 11-19 Report Bursting 11-20 Bursting on a Repeating Group 11-22 Creating an Additional Layout 11-24 Distributing a Report 11-26 Tracing the Report Distribution 11-28 Creating Variable Length Lines 11-30 Summary 11-32 Practice 11 Overview 11-33 12 Controlling the Paper Layout: Common Properties Objectives 12-2 Modifying Paper Layout Object Properties 12-3 Comparing Properties 12-5 Common Layout Properties 12-6 Sizing Objects 12-7 Anchors 12-9 Layout Object Relationships 12-11 Pagination Icons in the Paper Layout 12-14 Using Page Break Before 12-16 Using Page Break After 12-18 Using Page Protect 12-20 Controlling Print Frequency 12-22 Using Format Triggers 12-24 Layout Object Properties for Web Support 12-25 Summary 12-27 Practice 12 Overview 12-28

vii

13 Controlling the Paper Layout: Specific Properties Objectives 13-2 Properties of a Repeating Frame 13-3 Specifying Print Direction 13-4 Controlling the Number of Records per Page 13-6 Controlling Spacing Between Records 13-7 Minimum Widow Records 13-8 Column Mode 13-9 Properties of a Field 13-10 System Variables 13-12 Page Numbering 13-13 Valid Source Columns 13-15 Displaying File Contents 13-17 When Are the Contents Updated? 13-19 Linking and Importing Files 13-20 Comparing a File Link and a File Column 13-21 Specifying the Format Order 13-22 PDF Document Taxonomy Properties 13-24 Summary 13-25 Practice 13 Overview 13-26 14 Web Reporting Objectives 14-2 High Quality Web Publishing 14-3 Comparing Static and Dynamic Reporting 14-5 Adding Dynamic Content 14-7 Creating a Report Block 14-9 Invoking the Report Block Wizard 14-11 Examining the Web Source Code 14-12 rw:foreach Tag 14-14 rw:field Tag 14-15 Customizing Reports JSPs 14-16 Customizing Reports JSPs Using Style Sheets 14-17 Customizing Reports JSPs Using HTML Tags and Attributes 14-19 Customizing Reports JSPs Using Reports Custom Tags 14-20 Summary 14-24 Practice 14 Overview 14-25 15 Extending Functionality Using XML Objectives 15-2 Why Use XML Report Definitions? 15-3 Creating XML Report Definitions 15-5 Partial Report Definitions: Format Modification Example 15-7 Partial Report Definitions: Format Exception Example 15-9

viii

Full Report Definition: Data Model Modification Example 15-11 Running XML Report Definitions 15-15 Debugging XML Report Definitions 15-19 Summary 15-21 Practice 15 Overview 15-22 16 Creating and Using Report Parameters Objectives 16-2 Creating User Parameters 16-3 Referencing Parameters in a Report Query 16-6 Using Bind References 16-8 Using Lexical References 16-10 Hints and Tips When Referencing Parameters 16-12 Creating a List of Values 16-14 Referencing System Parameters 16-18 Building a Paper Parameter Form 16-20 Customizing a Paper Parameter Form 16-22 Using Parameter Form HTML Extensions 16-24 Parameter Form Header and Footer 16-26 Summary 16-27 Practice 16 Overview 16-28 17 Embedding a Graph in a Report Objectives 17-2 Adding a Graph to a Paper Report 17-3 Adding a Graph to a Web Report 17-5 Selecting the Graph Type 17-6 Selecting the Graph Data 17-7 Adding Options to the Graph 17-8 Customizing Web Graphs 17-10 The rw:graph Tag 17-11 Customizing Graphs Using the Graph.XML File 17-13 Using Graph Hyperlinks 17-15 Summary 17-18 Practice 17 Overview 17-19 18 Enhancing Matrix Reports Objectives 18-2 The Matrix Data Model 18-3 The Matrix Paper Layout 18-5 Creating Matrix Summaries 18-7 Creating the Matrix Manually 18-9 The Matrix with Group Data Model 18-11 The Matrix with Group Layout 18-12 Building a Nested Matrix 18-13 Nested Matrix Paper Layout 18-15
ix

Creating Nested Matrix Summaries 18-17 Displaying Zeros 18-19 Summary 18-21 Practice 18 Overview 18-22 19 Coding PL/SQL Triggers Objectives 19-2 Types of Triggers in Reports 19-3 Trigger Code 19-5 Using Report Triggers 19-6 Using Data Model Triggers: PL/SQL Group Filter 19-10 Using Data Model Triggers: Parameter Validation 19-12 Using Layout Triggers 19-14 Using a Format Trigger on a Frame 19-16 Using a Format Trigger on a Repeating Frame 19-18 Using a Format Trigger on a Field 19-20 Using a Format Trigger in a Web Layout 19-21 Using a Format Trigger on a Boilerplate Object 19-22 Writing Common Code 19-24 Event-Based Reporting 19-26 Event-Driven Publishing API 19-27 Invoking a Report from a Database Event 19-29 Summary 19-31 Practice 19 Overview 19-33 20 Extending Functionality Using the SRW Package Objectives 20-2 Contents of the SRW Package 20-3 Outputting Messages 20-5 Executing a Nested Report 20-7 Restricting Data 20-11 Initializing Fields 20-13 Creating a Table of Contents 20-15 Performing DDL Statements 20-17 Setting Format Attributes 20-19 Using Format Attributes in a Web Layout 20-22 Summary 20-24 Practice 20 Overview 20-25 21 Maximizing Performance Using OracleAS Reports Services Objectives 21-2 Running Reports Using OracleAS Reports Services 21-3 Report Request Methods 21-5 Oracle Application Server Components 21-7 Enabling Single Sign-On Access 21-9

Running the Web Layout: JSP Run-time Architecture 21-11 Running the Paper Layout: Servlet Run-time Architecture 21-12 Running a Paper Report on the Web 21-13 Running a Report from the Command Line 21-15 The OUTPUTIMAGEFORMAT Parameter 21-16 The Schedule Parameter 21-17 Reports Caching 21-19 Using Oracle Enterprise Manager 21-20 Managing and Monitoring OracleAS Reports Services 21-21 What Is the Queue Manager? 21-22 Queue Manager 21-23 Using the Queue Manager 21-25 Summary 21-26 Practice 21 Overview 21-27 22 Building Reports: Efficiency Guidelines Objectives 22-2 Tuning Reports 22-3 Performance Measurement 22-5 Non SQL Data Sources 22-6 Investigating the Data Model 22-8 Investigating the Paper Layout 22-12 Running the Report 22-14 Different Development and Run-Time Environments 22-16 Developing Reports to Run in Different GUIs 22-18 Setting NLS Language Environment Variables 22-20 Translating an Oracle Reports Application 22-22 Summary 22-24 Practice 22 Overview 22-25 Appendix A - Practice Solutions Appendix B - Table Descriptions Appendix C - Creating Web Layout Templates Glossary

xi

Вам также может понравиться