Tải bản đầy đủ (.pdf) (796 trang)

building oracle report server 10g

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (12.19 MB, 796 trang )

Oracle® Reports
Building Reports
10g Release 2 (10.1.2)
B13895-01

July 2005


Oracle Reports Building Reports, 10g Release 2 (10.1.2)
B13895-01
Copyright © 2003, 2005, Oracle. All rights reserved.
Primary Author: Ingrid Snedecor
Contributors: Ellen Gravina, Vinayak Hegde, Rohit Marwaha, Ratheesh Pai, Vinodkumar Pandurangan,
Rajesh Ramachandran, Vishal Sharma, Navneet Singh, Puvanenthiran Subbaraj, Philipp Weckerle, Panna
Hegde, Pravin Prabhakar
The Programs (which include both the software and documentation) contain proprietary information; they
are provided under a license agreement containing restrictions on use and disclosure and are also protected
by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly,
or decompilation of the Programs, except to the extent required to obtain interoperability with other
independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice. If you find any problems in
the documentation, please report them to us in writing. This document is not warranted to be error-free.
Except as may be expressly permitted in your license agreement for these Programs, no part of these
Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose.
If the Programs are delivered to the United States Government or anyone licensing or using the Programs on
behalf of the United States Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data
delivered to U.S. Government customers are "commercial computer software" or "commercial technical data"
pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As
such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation


and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license
agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial
Computer Software—Restricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City,
CA 94065
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy and other measures to ensure the safe use of such applications if the Programs are used for such
purposes, and we disclaim liability for any damages caused by such use of the Programs.
Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective owners.
The Programs may provide links to Web sites and access to content, products, and services from third
parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites.
You bear all risks associated with the use of such content. If you choose to purchase any products or services
from a third party, the relationship is directly between you and the third party. Oracle is not responsible for:
(a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the
third party, including delivery of products or services and warranty obligations related to purchased
products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from
dealing with any third party.


Contents
Preface ............................................................................................................................................................. xxv
Audience................................................................................................................................................... xxv
Documentation Accessibility ................................................................................................................. xxv
Related Documentation .......................................................................................................................... xxvi
Conventions ............................................................................................................................................. xxvi
Accessing the Example Reports ............................................................................................................ xxvi
Accessing the Data Sources................................................................................................................... xxvii

1


Basic Concepts
1.1
1.1.1
1.1.2
1.2
1.2.1
1.2.1.1
1.2.1.2
1.2.2
1.3
1.3.1
1.3.2
1.3.3
1.3.4
1.3.5
1.3.6
1.3.7
1.3.7.1
1.3.7.2
1.4
1.4.1
1.4.2
1.4.3
1.4.4
1.5
1.5.1
1.5.2

Reports Builder............................................................................................................................ 1-1

About Reports Builder ........................................................................................................ 1-1
About this release ................................................................................................................ 1-2
Reports.......................................................................................................................................... 1-2
About reports ....................................................................................................................... 1-2
Creating a new report using the Report Wizard...................................................... 1-3
Creating a new report manually ................................................................................ 1-3
About Web reports .............................................................................................................. 1-3
Report Styles ................................................................................................................................ 1-5
About tabular reports.......................................................................................................... 1-5
About group above reports ................................................................................................ 1-5
About group left reports..................................................................................................... 1-5
About form-like reports ...................................................................................................... 1-6
About form letter reports.................................................................................................... 1-6
About mailing label reports ............................................................................................... 1-6
About matrix reports........................................................................................................... 1-6
Matrix data model ........................................................................................................ 1-7
Matrix layout.............................................................................................................. 1-10
Wizards...................................................................................................................................... 1-11
About the Report Wizard ................................................................................................ 1-12
About the Report Block Wizard ..................................................................................... 1-12
About the Data Wizard.................................................................................................... 1-12
About the Graph Wizard ................................................................................................. 1-13
The Object Navigator .............................................................................................................. 1-15
About the Object Navigator ............................................................................................ 1-15
About Object Navigator views ....................................................................................... 1-16

iii


1.6

The Report Editor.....................................................................................................................
1.6.1
About the Report Editor ..................................................................................................
1.6.2
About the Data Model view ............................................................................................
1.6.3
About the Paper Layout view .........................................................................................
1.6.4
About the Paper Design view .........................................................................................
1.6.5
About the Paper Parameter Form view.........................................................................
1.6.6
About the Web Source view............................................................................................
1.6.7
About the tool palette and toolbar .................................................................................
1.7
Data Model Objects..................................................................................................................
1.7.1
About queries ....................................................................................................................
1.7.2
About groups.....................................................................................................................
1.7.3
About database columns .................................................................................................
1.7.4
About data links................................................................................................................
1.7.5
About Query Builder........................................................................................................
1.8
Layout Objects ..........................................................................................................................
1.8.1

About frames .....................................................................................................................
1.8.2
About repeating frames ...................................................................................................
1.8.3
About frame and repeating frame sizing ......................................................................
1.8.4
About fields .......................................................................................................................
1.8.5
About boilerplate objects .................................................................................................
1.9
Parameter Form Objects..........................................................................................................
1.9.1
About parameters .............................................................................................................
1.9.2
About Parameter Form fields..........................................................................................
1.9.3
About Parameter Form boilerplate ................................................................................
1.9.4
About Parameter Forms for Web reports .....................................................................
1.10
The Property Inspector............................................................................................................
1.10.1
About the Property Inspector .........................................................................................
1.10.1.1
About making multiple selections in the Property Inspector .............................
1.11
Runtime Views .........................................................................................................................
1.11.1
About the Runtime Parameter Form .............................................................................
1.11.2

About the Previewer ........................................................................................................
1.12
Executables................................................................................................................................

2

1-16
1-16
1-16
1-17
1-17
1-18
1-19
1-20
1-20
1-20
1-23
1-24
1-24
1-26
1-26
1-27
1-27
1-27
1-28
1-29
1-30
1-30
1-31
1-32

1-32
1-33
1-33
1-33
1-34
1-34
1-34
1-35

Advanced Concepts
2.1
Reports.......................................................................................................................................... 2-1
2.1.1
About report titles ............................................................................................................... 2-1
2.1.2
About report sectioning and sections ............................................................................... 2-2
2.1.3
About the report unit of measurement............................................................................. 2-3
2.1.4
About the report dimensions ............................................................................................. 2-3
2.1.5
About fonts in reports ......................................................................................................... 2-4
2.1.6
About conditional formatting ............................................................................................ 2-4
2.1.7
About nested matrix reports .............................................................................................. 2-5
2.1.8
About matrix with group reports...................................................................................... 2-5
2.2
Web Reports................................................................................................................................. 2-6

2.2.1
About JavaServer Pages (JSPs) and servlets .................................................................... 2-7
2.2.1.1
Using JSPs in Oracle Reports ...................................................................................... 2-7
2.2.1.2
Opening or running an encoded JSP-based Web report......................................... 2-8

iv


2.2.1.3
Embedding a character set in a JSP file dynamically .............................................. 2-8
2.2.2
About previewing JSP-based Web reports....................................................................... 2-9
2.2.3
About Web links for HTML output ............................................................................... 2-11
2.2.4
About Web links for PDF output ................................................................................... 2-12
2.2.5
About hyperlinks .............................................................................................................. 2-13
2.2.6
About graph hyperlinks .................................................................................................. 2-13
2.2.7
About hyperlink destinations ......................................................................................... 2-13
2.2.8
About bookmarks ............................................................................................................. 2-13
2.2.9
About application command line links ......................................................................... 2-13
2.2.10
About before and after escapes....................................................................................... 2-14

2.2.11
About style sheets............................................................................................................. 2-15
2.3
Data Model Objects.................................................................................................................. 2-16
2.3.1
About summary columns ................................................................................................ 2-16
2.3.2
About formula columns................................................................................................... 2-16
2.3.3
About placeholder columns ............................................................................................ 2-17
2.3.4
About referencing columns and parameters ............................................................... 2-17
2.3.4.1
About bind references............................................................................................... 2-17
2.3.4.2
About lexical references............................................................................................ 2-18
2.3.4.3
Differences between bind and lexical references .................................................. 2-22
2.3.5
About non-linkable queries............................................................................................. 2-22
2.3.6
About links versus groups .............................................................................................. 2-22
2.3.7
About matrix objects ........................................................................................................ 2-24
2.4
Layout Objects .......................................................................................................................... 2-26
2.4.1
About layout objects......................................................................................................... 2-26
2.4.2
About layout defaulting .................................................................................................. 2-27

2.4.3
About images..................................................................................................................... 2-28
2.4.4
About anchors ................................................................................................................... 2-29
2.4.4.1
Implicit anchoring algorithm................................................................................... 2-32
2.4.5
About changing colors and patterns.............................................................................. 2-34
2.4.6
About resizing objects ...................................................................................................... 2-35
2.4.7
About moving and layering objects in the Paper Layout view ................................. 2-35
2.5
Parameter Form Objects.......................................................................................................... 2-36
2.5.1
About Parameter Form HTML extensions.................................................................... 2-36
2.6
PL/SQL ..................................................................................................................................... 2-37
2.6.1
About the PL/SQL Editor ............................................................................................... 2-37
2.6.2
About the Stored PL/SQL Editor................................................................................... 2-37
2.6.3
About the Syntax Palette ................................................................................................. 2-38
2.6.4
About program units........................................................................................................ 2-38
2.6.5
About stored program units............................................................................................ 2-39
2.6.6
About external PL/SQL libraries ................................................................................... 2-39

2.6.7
About attached libraries .................................................................................................. 2-40
2.6.8
About formulas ................................................................................................................. 2-40
2.6.9
About group filters ........................................................................................................... 2-41
2.6.10
About REF CURSOR queries .......................................................................................... 2-43
2.6.11
About DML and DDL ...................................................................................................... 2-45
2.6.12
About built-in packages................................................................................................... 2-45
2.6.12.1
About the Reports Builder built-in package (SRW) ............................................. 2-46

v


2.6.12.2
About the Tools built-in packages .........................................................................
2.6.13
About triggers ...................................................................................................................
2.6.13.1
About report triggers ................................................................................................
2.6.13.2
About format triggers ...............................................................................................
2.6.13.3
About validation triggers .........................................................................................
2.6.13.4
About database triggers............................................................................................

2.7
Templates ..................................................................................................................................
2.7.1
About templates................................................................................................................
2.7.2
About template attributes................................................................................................
2.7.3
About applying templates ...............................................................................................
2.7.4
About inheritance in templates.......................................................................................
2.7.5
About the Template Editor..............................................................................................
2.8
Output Formats and Capabilities ..........................................................................................
2.8.1
About format order ..........................................................................................................
2.8.2
About batch reporting .....................................................................................................
2.8.3
About report distribution ................................................................................................
2.8.3.1
About the DST file .....................................................................................................
2.8.4
About pluggable destinations.........................................................................................
2.8.5
About event-driven publishing ......................................................................................
2.8.6
About switching the printer tray....................................................................................
2.8.7
About XML in reports ......................................................................................................

2.8.8
About HTML and HTMLCSS output ...........................................................................
2.8.8.1
About HTML page streaming..................................................................................
2.8.9
About HTML formatting .................................................................................................
2.8.10
About PDF output ............................................................................................................
2.8.11
About RTF output.............................................................................................................
2.8.12
About delimited output ...................................................................................................
2.8.13
About spreadsheet output...............................................................................................
2.8.14
About text output .............................................................................................................
2.8.15
About creating an ASCII (character-mode) report ......................................................
2.9
Data Sources .............................................................................................................................
2.9.1
About database roles ........................................................................................................
2.9.2
About Oracle Net Services...............................................................................................
2.9.3
About user exits ................................................................................................................
2.9.4
About the Oracle Call Interface (OCI) ...........................................................................
2.10
Debugging Tools ......................................................................................................................

2.10.1
About the debugging process .........................................................................................
2.10.2
About the PL/SQL Interpreter .......................................................................................
2.10.3
About the Source pane.....................................................................................................
2.10.4
About debug commands in the PL/SQL Interpreter ..................................................
2.10.5
About debug actions ........................................................................................................
2.10.5.1
About creating a debug action.................................................................................
2.10.6
About the current execution location ............................................................................
2.10.7
About the current scope location....................................................................................
2.10.8
About debug levels...........................................................................................................
2.10.9
About modifying code at runtime..................................................................................

vi

2-46
2-48
2-48
2-51
2-51
2-52
2-52

2-53
2-53
2-55
2-55
2-56
2-56
2-57
2-57
2-58
2-59
2-60
2-61
2-61
2-61
2-62
2-64
2-65
2-70
2-71
2-72
2-75
2-79
2-79
2-80
2-80
2-81
2-81
2-81
2-81
2-82

2-82
2-82
2-83
2-83
2-84
2-85
2-85
2-85
2-86


3

How To...
3.1
3.1.1
3.1.2
3.2
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
3.2.7
3.2.8
3.3
3.3.1
3.3.2
3.3.3

3.3.4
3.3.5
3.3.6
3.3.7
3.3.8
3.3.8.1
3.3.8.2
3.3.8.3
3.3.8.4
3.3.8.5
3.3.8.6
3.3.8.7
3.3.8.8
3.3.9
3.4
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.5
3.5.1
3.5.2
3.5.3
3.5.4
3.5.5
3.5.6
3.5.7
3.5.8
3.5.9


Access Oracle Reports Documentation.................................................................................... 3-1
Using the Oracle Reports online Help ............................................................................. 3-2
Locating other documentation........................................................................................... 3-2
Set Properties and Preferences.................................................................................................. 3-4
Displaying the Property Inspector .................................................................................... 3-4
Setting report properties..................................................................................................... 3-5
Setting report preferences................................................................................................... 3-5
Setting preferences for the Object Navigator................................................................... 3-5
Setting properties for an ASCII (character-mode) report .............................................. 3-5
Setting color palette preferences........................................................................................ 3-6
Setting properties of multiple objects ............................................................................... 3-7
Comparing the properties of one object to another ........................................................ 3-7
Perform Common Tasks ............................................................................................................ 3-8
Connecting to a database.................................................................................................... 3-8
Opening a report.................................................................................................................. 3-8
Saving a report ..................................................................................................................... 3-8
Copying a report .................................................................................................................. 3-9
Renaming a report ............................................................................................................... 3-9
Deleting a report .................................................................................................................. 3-9
Archiving a report ............................................................................................................... 3-9
Selecting and deselecting objects.................................................................................... 3-10
Selecting single objects.............................................................................................. 3-10
Selecting multiple objects ......................................................................................... 3-10
Selecting objects owned by a frame ........................................................................ 3-11
Selecting grouped objects ......................................................................................... 3-11
Selecting all objects in a report region .................................................................... 3-11
Selecting overlapped objects.................................................................................... 3-11
Deselecting single objects ......................................................................................... 3-11
Deselecting multiple objects .................................................................................... 3-12

Deleting an object ............................................................................................................. 3-12
Work with the Object Navigator ........................................................................................... 3-12
Displaying a Report Editor view from the Object Navigator .................................... 3-12
Expanding and collapsing nodes ................................................................................... 3-13
Searching for nodes .......................................................................................................... 3-13
Changing Object Navigator views ................................................................................. 3-13
Setting preferences for the Object Navigator................................................................ 3-13
Work with Reports................................................................................................................... 3-13
Creating a report ............................................................................................................... 3-14
Creating a multiquery group above report................................................................... 3-15
Creating a nested matrix report...................................................................................... 3-15
Creating a default layout for a report ............................................................................ 3-15
Creating an additional report layout ............................................................................. 3-15
Adding a title to a report ................................................................................................. 3-15
Adding a table of contents to a report ........................................................................... 3-16
Adding index to a report ................................................................................................. 3-16
Creating an ASCII (character-mode) report.................................................................. 3-16

vii


3.5.10
Preparing a multiplatform report...................................................................................
3.5.11
Preparing a report for translation into other languages .............................................
3.6
Work with Web Reports .........................................................................................................
3.6.1
Creating a Web report......................................................................................................
3.6.2

Viewing the source code for a Web report....................................................................
3.6.3
Adding report data to an existing Web page (HTML file) .........................................
3.6.4
Adding a report block to a Web page............................................................................
3.6.5
Adding an image ..............................................................................................................
3.6.6
Adding a graph .................................................................................................................
3.6.7
Editing a graph..................................................................................................................
3.6.8
Adding a graph hyperlink...............................................................................................
3.6.9
Preparing a paper-based report for the Web ................................................................
3.6.10
Adding Web links to paper-based reports....................................................................
3.6.10.1
Using the user interface ............................................................................................
3.6.10.2
Using PL/SQL............................................................................................................
3.7
Run and Dispatch a Report ....................................................................................................
3.7.1
Running and dispatching a report from the user interface ........................................
3.7.2
Running a report from the command line ....................................................................
3.7.3
Running a report using a command file........................................................................
3.7.4

Running a report to a remote Reports Server...............................................................
3.7.5
Generating HTML or HTMLCSS output.......................................................................
3.7.6
Generating PDF output....................................................................................................
3.7.7
Generating XML output...................................................................................................
3.7.8
Generating RTF output ....................................................................................................
3.7.9
Generating text output.....................................................................................................
3.7.10
Generating delimited output ..........................................................................................
3.7.11
Generating spreadsheet output ......................................................................................
3.7.12
Distributing a report to multiple destinations..............................................................
3.7.13
Deploying a report............................................................................................................
3.7.14
Changing orientation .......................................................................................................
3.7.15
Suppressing the Parameter Form ...................................................................................
3.7.16
Viewing report output .....................................................................................................
3.7.16.1
Viewing the printable area ......................................................................................
3.7.16.2
Displaying report output in the Paper Design view ............................................
3.7.16.3

Displaying report output in the Previewer ...........................................................
3.7.16.4
Displaying report output in your Web browser ...................................................
3.7.16.5
Displaying individual pages of HTML report output .........................................
3.7.16.6
Scrolling and paging .................................................................................................
3.7.16.7
Splitting the viewing region.....................................................................................
3.7.16.8
Magnifying or reducing the output ........................................................................
3.7.17
Printing a report................................................................................................................
3.7.17.1
Printing a report from the Paper Design or Paper Layout view ........................
3.7.17.2
Printing a report from the Previewer .....................................................................
3.7.17.3
Printing a report from your Web browser .............................................................
3.7.17.4
Printing a report on a preprinted form ..................................................................
3.7.17.5
Switching the printer tray ........................................................................................
3.7.17.6
Printing a report on UNIX........................................................................................

viii

3-17
3-17

3-17
3-18
3-18
3-18
3-19
3-19
3-19
3-19
3-19
3-20
3-20
3-20
3-26
3-31
3-32
3-33
3-33
3-34
3-34
3-35
3-35
3-36
3-37
3-37
3-38
3-39
3-40
3-40
3-41
3-41

3-42
3-42
3-42
3-43
3-44
3-44
3-44
3-44
3-45
3-45
3-45
3-45
3-46
3-46
3-47


3.7.18
E-mailing a report .............................................................................................................
3.8
Work with the Data Model .....................................................................................................
3.8.1
Creating a query................................................................................................................
3.8.1.1
Creating a query: Report Wizard ............................................................................
3.8.1.2
Creating a query: Data Wizard................................................................................
3.8.1.3
Creating a query: SQL Query tool...........................................................................
3.8.1.4

Creating a query: XML Query tool .........................................................................
3.8.1.5
Creating a query: JDBC Query tool.........................................................................
3.8.1.6
Creating a query: Text Query tool .........................................................................
3.8.1.7
Creating a query: Express Server Query tool .......................................................
3.8.1.8
Creating a query: OLAP Query tool .......................................................................
3.8.1.9
Creating a query: REF CURSOR Query tool .........................................................
3.8.2
Modifying a query ............................................................................................................
3.8.3
Using Query Builder .......................................................................................................
3.8.4
Selecting HTML tags from the database .......................................................................
3.8.5
Selecting an image from the database ...........................................................................
3.8.6
Selecting an image URL from the database ..................................................................
3.8.7
Creating a break group ....................................................................................................
3.8.8
Creating a matrix (cross-product) group .....................................................................
3.8.9
Creating a data link ..........................................................................................................
3.8.10
Creating or editing a formula column ...........................................................................
3.8.11

Creating a summary column...........................................................................................
3.8.12
Creating or editing a placeholder column ....................................................................
3.9
Work with the Report Layout ................................................................................................
3.9.1
General Layout Objects....................................................................................................
3.9.1.1
Creating a field object ...............................................................................................
3.9.1.2
Creating a frame or repeating frame ......................................................................
3.9.1.3
Creating a matrix object............................................................................................
3.9.1.4
Creating a barcode using a barcode font ...............................................................
3.9.1.5
Applying conditional formatting to a layout object .............................................
3.9.2
Text Objects........................................................................................................................
3.9.2.1
Creating a boilerplate object for text.......................................................................
3.9.2.2
Creating a boilerplate object for text that displays every other page ................
3.9.2.3
Creating a boilerplate text object for HTML tags .................................................
3.9.2.4
Editing text .................................................................................................................
3.9.2.5
Referencing a field in boilerplate text.....................................................................
3.9.2.6

Linking a boilerplate text object to a file ................................................................
3.9.2.7
Linking an HTML text object to a file.....................................................................
3.9.2.8
Wrapping text in a field............................................................................................
3.9.2.9
Changing text attributes ...........................................................................................
3.9.2.10
Changing text attributes using PL/SQL ................................................................
3.9.3
Page Numbers or Date/Time Stamps ...........................................................................
3.9.3.1
Creating page numbers ............................................................................................
3.9.3.2
Resetting page numbers ...........................................................................................
3.9.3.3
Creating a time or date stamp .................................................................................
3.9.4
Borders ...............................................................................................................................
3.9.4.1
Showing or hiding object borders ...........................................................................

3-47
3-48
3-48
3-49
3-49
3-49
3-50
3-50

3-50
3-51
3-51
3-51
3-52
3-52
3-52
3-53
3-54
3-55
3-55
3-56
3-56
3-57
3-58
3-59
3-59
3-59
3-60
3-60
3-61
3-62
3-62
3-62
3-63
3-63
3-65
3-65
3-65
3-66

3-66
3-67
3-67
3-68
3-68
3-69
3-69
3-69
3-69

ix


3.9.4.2
3.9.4.3
3.9.5
3.9.5.1
3.9.5.2
3.9.5.3
3.9.6
3.9.6.1
3.9.6.2
3.9.6.3
3.9.6.4
3.9.6.5
3.9.6.6
3.9.6.7
3.9.6.8
3.9.6.9
3.9.7

3.9.7.1
3.9.7.2
3.9.7.3
3.9.7.4
3.9.7.5
3.9.7.6
3.9.8
3.9.8.1
3.9.8.2
3.9.8.3
3.9.8.4
3.9.8.5
3.9.9
3.9.9.1
3.9.9.2
3.9.9.3
3.9.10
3.9.10.1
3.9.10.2
3.9.11
3.9.11.1
3.9.11.2
3.9.11.3
3.9.11.4
3.9.11.5
3.9.11.6
3.9.11.7
3.9.11.8
3.9.12
3.9.12.1


x

Changing object border attributes ..........................................................................
Changing the current mode (Confine or Flex) ......................................................
Anchors ..............................................................................................................................
Anchoring objects together ......................................................................................
Viewing implicit anchors ........................................................................................
Moving an anchor......................................................................................................
Colors, Patterns, and Highlighting ................................................................................
Setting color palette preferences .............................................................................
Changing colors .........................................................................................................
Changing patterns .....................................................................................................
Changing colors and patterns using PL/SQL .......................................................
Modifying the color palette......................................................................................
Importing or exporting a color palette ...................................................................
Highlighting a value .................................................................................................
Highlighting a row ....................................................................................................
Alternating row colors ..............................................................................................
Format Masks ....................................................................................................................
Specifying date and time format masks .................................................................
Specifying number format masks ...........................................................................
Applying a format mask to a numeric object ........................................................
Applying a format mask to a date object ...............................................................
Adding a custom format mask ................................................................................
Changing the format mask for multiple fields......................................................
Graphic or Image Objects ................................................................................................
Adding an image .......................................................................................................
Adding a graph..........................................................................................................
Editing a graph ..........................................................................................................

Adding a graph hyperlink .......................................................................................
Creating a drawing object ........................................................................................
Page or Group Headers or Footers.................................................................................
Creating a text heading.............................................................................................
Creating a heading that includes database values ...............................................
Creating a group header or footer ..........................................................................
Margin, Header Page, or Trailer Page Objects .............................................................
Creating a margin object...........................................................................................
Creating a header page or trailer page object........................................................
Move Objects .....................................................................................................................
Moving multiple objects ...........................................................................................
Moving an object outside its parent........................................................................
Adjusting parent borders automatically ................................................................
Moving a column in report output .........................................................................
Offsetting detail objects in a group report .............................................................
Aligning objects .........................................................................................................
Changing object layering..........................................................................................
Rotating a boilerplate object.....................................................................................
Resize Objects ....................................................................................................................
Resizing objects ..........................................................................................................

3-70
3-70
3-70
3-71
3-71
3-71
3-72
3-72
3-72

3-72
3-73
3-73
3-74
3-75
3-75
3-76
3-76
3-77
3-78
3-81
3-81
3-82
3-82
3-82
3-82
3-84
3-87
3-88
3-89
3-90
3-90
3-90
3-91
3-91
3-92
3-92
3-92
3-93
3-93

3-93
3-93
3-94
3-94
3-94
3-95
3-95
3-95


3.9.12.2
Making multiple objects the same size...................................................................
3.9.12.3
Resizing object borders .............................................................................................
3.9.13
Change Spacing.................................................................................................................
3.9.13.1
Changing columns labels or widths .......................................................................
3.9.13.2
Changing spacing within a text object ...................................................................
3.9.13.3
Changing the default layout spacing......................................................................
3.9.13.4
Changing the spacing between all rows ................................................................
3.9.13.5
Adding blank lines between groups of rows ........................................................
3.9.14
Modify the Page Layout ..................................................................................................
3.9.14.1
Adjusting margins .....................................................................................................

3.9.14.2
Adding a page break.................................................................................................
3.10
Work with Report Sections.....................................................................................................
3.10.1
Displaying a section layout view ...................................................................................
3.10.2
Creating a default layout for a section ..........................................................................
3.11
Work with Parameters and the Parameter Form ..............................................................
3.11.1
Using a pre-defined system parameter .......................................................................
3.11.2
Creating a user parameter .............................................................................................
3.11.3
Creating a list of values (LOV) for a parameter .........................................................
3.11.4
Validating a parameter value at runtime ....................................................................
3.11.5
Creating a default Parameter Form..............................................................................
3.11.6
Selecting parameters to include in the Runtime Parameter Form..........................
3.11.7
Displaying the Parameter Form at runtime ................................................................
3.11.8
Adding more pages to the Runtime Parameter Form ...............................................
3.11.9
Passing parameters to reports running in batch mode .............................................
3.11.10
Creating an HTML Parameter Form header using PL/SQL....................................

3.11.11
Creating an HTML Parameter Form footer using PL/SQL......................................
3.11.12
Creating HTML Parameter Form input or select events...........................................
3.11.13
Changing HTML Parameter Form input to uppercase.............................................
3.12
Define a Template ..................................................................................................................
3.12.1
Creating a template ........................................................................................................
3.12.2
Defining default template attributes............................................................................
3.12.3
Defining override template attributes .........................................................................
3.12.4
Applying a template to a report ...................................................................................
3.12.5
Formatting the report title in a template .....................................................................
3.12.6
Adding items and objects to a template ......................................................................
3.12.7
Modifying objects in the template margin ..................................................................
3.12.8
Modifying the color, pattern, or border of body objects in a template...................
3.12.9
Adding a template to the pre-defined templates list.................................................
3.12.10
Creating an HTML template for a report portlet .......................................................
3.13
Use PL/SQL in a Report or Template.................................................................................

3.13.1
Using a built-in package ................................................................................................
3.13.2
Working with the PL/SQL Editor................................................................................
3.13.2.1
Defining PL/SQL.....................................................................................................
3.13.2.2
Searching and replacing text in a program unit..................................................
3.13.2.3
Editing a program unit ...........................................................................................
3.13.2.4
Inserting syntax into the PL/SQL Editor .............................................................
3.13.3
Creating or editing report-level or template-level PL/SQL.....................................

3-95
3-96
3-96
3-96
3-96
3-96
3-97
3-97
3-98
3-98
3-98
3-99
3-99
3-99
3-100

3-100
3-101
3-101
3-102
3-102
3-102
3-103
3-103
3-103
3-103
3-103
3-104
3-106
3-106
3-106
3-107
3-107
3-108
3-109
3-109
3-110
3-110
3-110
3-111
3-111
3-111
3-112
3-112
3-112
3-113

3-117
3-117

xi


3.13.3.1
Creating a local program unit................................................................................
3.13.3.2
Creating a stored program unit.............................................................................
3.13.3.3
Deleting a program unit .........................................................................................
3.13.3.4
Moving a program unit between client and database server............................
3.13.3.5
Creating a report trigger.........................................................................................
3.13.3.6
Deleting a report trigger .........................................................................................
3.13.3.7
Creating a database trigger ....................................................................................
3.13.4
Creating or editing object-level PL/SQL.....................................................................
3.13.4.1
Creating or editing a format trigger .....................................................................
3.13.4.2
Creating or editing a group filter ..........................................................................
3.13.4.3
Creating or editing a formula column..................................................................
3.13.4.4
Creating a placeholder column .............................................................................

3.13.4.5
Changing colors and patterns using PL/SQL .....................................................
3.13.5
Creating or editing an external PL/SQL library ........................................................
3.13.5.1
Creating an external PL/SQL library ...................................................................
3.13.5.2
Adding a program unit to an open library ..........................................................
3.13.5.3
Editing a program unit in a PL/SQL library .......................................................
3.13.5.4
Removing a program unit from a PL/SQL library.............................................
3.13.5.5
Attaching a PL/SQL library...................................................................................
3.13.5.6
Converting external PL/SQL libraries .................................................................
3.13.6
Compiling and running program units.......................................................................
3.13.6.1
Compiling a single program unit..........................................................................
3.13.6.2
Compiling all program units .................................................................................
3.13.6.3
Compiling all uncompiled program units ...........................................................
3.14
Debug a Report.......................................................................................................................
3.14.1
Debugging a report.........................................................................................................
3.14.2
Running a report in debug mode .................................................................................

3.14.3
Setting a breakpoint........................................................................................................
3.14.4
Setting a debug trigger...................................................................................................
3.14.5
Browsing debug actions.................................................................................................
3.14.6
Editing a debug action ...................................................................................................
3.14.7
Disabling and enabling debug actions ........................................................................
3.14.8
Deleting a debug action .................................................................................................
3.14.9
Running a program unit in the PL/SQL Interpreter .................................................
3.14.10
Inserting a Navigator pane in the PL/SQL Interpreter.............................................
3.14.11
Controlling program unit execution ............................................................................
3.14.12
Stepping through the code ............................................................................................
3.14.13
Modifying code at runtime............................................................................................
3.14.14
Displaying the current scope location .........................................................................
3.14.15
Examining or changing local variables........................................................................
3.14.16
Modifying application variables...................................................................................
3.14.17
Viewing subprogram references ..................................................................................

3.14.18
Tracing report execution................................................................................................
3.14.19
Tracing report distribution ...........................................................................................
3.14.20
Tracing using the SQL TRACE function .....................................................................
3.14.20.1
Performing a user-level trace.................................................................................
3.14.20.2
Performing a system-level trace ............................................................................

xii

3-118
3-118
3-119
3-119
3-120
3-120
3-120
3-121
3-121
3-122
3-122
3-122
3-122
3-122
3-122
3-123
3-123

3-123
3-123
3-124
3-124
3-124
3-125
3-125
3-125
3-126
3-126
3-127
3-127
3-128
3-129
3-129
3-129
3-129
3-130
3-130
3-130
3-131
3-131
3-132
3-132
3-132
3-133
3-133
3-133
3-134
3-134



3.15
Integrate with Other Products .............................................................................................
3.15.1
Publishing a report as a portlet in OracleAS Portal...................................................
3.15.1.1
Running reports on OracleAS Portal as an item link .........................................
3.15.2
Accessing non-Oracle data sources..............................................................................
3.15.3
Integrating with the Oracle Express pluggable data source ....................................
3.16
Administer Reports Builder .................................................................................................
3.16.1
Setting a database role....................................................................................................
3.16.2
Converting from one format to another ......................................................................
3.16.3
Improving performance using SQL statements .........................................................
3.16.4
Improving performance using WHERE clauses ........................................................

4

3-134
3-134
3-135
3-135
3-137

3-137
3-137
3-138
3-138
3-138

Visual Index
4.1
4.1.1
4.1.2
4.1.3
4.1.4
4.1.5
4.2
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.3
4.3.1
4.3.2
4.3.3
4.3.4
4.3.5
4.3.6
4.3.7
4.3.8
4.3.9
4.3.10

4.4
4.4.1
4.4.2
4.4.3
4.5
4.5.1
4.5.2
4.5.3
4.5.4
4.5.5
4.5.6
4.5.7

Part 1: Building Basic Reports ................................................................................................... 4-1
Building a tabular report .................................................................................................... 4-1
Building a mailing label report .......................................................................................... 4-1
Building a form letter report .............................................................................................. 4-2
Building a master/master report ...................................................................................... 4-2
Building a summary report ................................................................................................ 4-3
Part 2: Building Group Reports ................................................................................................ 4-3
Building a single-query group report ............................................................................... 4-3
Building a two-query group report................................................................................... 4-4
Building an across group report ........................................................................................ 4-5
Building a group left summary report ............................................................................. 4-5
Building a group left formula report ................................................................................ 4-6
Part 3: Building Reports with Special Formatting.................................................................. 4-6
Building a wrapped field report........................................................................................ 4-6
Building a header and footer report ................................................................................. 4-7
Building a header with database values report............................................................... 4-7
Building a report with graphics, text, and color ............................................................. 4-8

Building a report that renumbers pages by repeating frame ........................................ 4-9
Building an intermixed fields report ................................................................................ 4-9
Building a report that suppresses labels ....................................................................... 4-10
Building a conditional form letter report ...................................................................... 4-10
Building a report with conditional highlighting.......................................................... 4-12
Building a report with dynamic graphics ..................................................................... 4-13
Part 4: Building Matrix Reports ............................................................................................. 4-13
Building a matrix report .................................................................................................. 4-13
Building a nested matrix report...................................................................................... 4-14
Building a matrix with group above report.................................................................. 4-14
Part 5: Building Reports for Business Cases ........................................................................ 4-15
Building a time series calculations report ..................................................................... 4-15
Deploying a paper report to Microsoft Excel output .................................................. 4-16
Building a report with aggregate data........................................................................... 4-16
Building a check printing report with spelled-out cash amounts ............................. 4-17
Building a report using a preprinted form ................................................................... 4-18
Building an invoice report............................................................................................... 4-18
Building a ranking report ................................................................................................ 4-19

xiii


4.5.8
Building a report with a simple table of contents and index .....................................
4.5.9
Building a report with a multilevel table of contents ..................................................
4.5.10
Bursting and distributing a report .................................................................................
4.5.11
Building a report with multibyte characters for PDF output.....................................

4.6
Part 6: Building Reports with PL/SQL and Java.................................................................
4.6.1
Building a PL/SQL report ...............................................................................................
4.6.2
Building a paper report with REF CURSORs ...............................................................
4.6.3
Building a simple Parameter Form for a JSP-based Web report................................
4.6.4
Building a report with a barcode....................................................................................
4.6.5
Building an accessible JSP-based Web report...............................................................
4.7
Part 7: Building Reports with Pluggable Data Sources ......................................................
4.7.1
Building a report with an XML pluggable data source...............................................
4.7.2
Building a report with a text pluggable data source ...................................................
4.7.3
Building a report with an OLAP pluggable data source ............................................
4.7.4
Building a report using Oracle Express data ................................................................
4.8
Summary ...................................................................................................................................

Part I
5

6-2
6-2

6-4
6-5

Prerequisites for this example................................................................................................... 7-2
Use the Report Wizard to create a form letter report ............................................................ 7-2
Summary ...................................................................................................................................... 7-4

Building a Master/Master Report
8.1
8.2
8.3
8.4
8.5
8.6
8.7

xiv

Prerequisites for this example...................................................................................................
Use the Report Wizard to create a mailing label report ........................................................
Add vertical spacing...................................................................................................................
Summary ......................................................................................................................................

Building a Form Letter Report
7.1
7.2
7.3

8


Prerequisites for this example................................................................................................... 5-2
Use the Report Wizard to create a report ................................................................................ 5-2
Summary ...................................................................................................................................... 5-4

Building a Mailing Label Report
6.1
6.2
6.3
6.4

7

Building Basic Reports

Building a Tabular Report
5.1
5.2
5.3

6

4-20
4-21
4-21
4-21
4-22
4-22
4-23
4-23
4-24

4-25
4-26
4-26
4-26
4-27
4-28
4-28

Prerequisites for this example...................................................................................................
Create a new report manually...................................................................................................
Use the Data Wizard to create two queries .............................................................................
Use the Report Wizard to layout the data...............................................................................
Use the Paper Layout view to add white space .....................................................................
Format a field...............................................................................................................................
Summary ......................................................................................................................................

8-2
8-2
8-2
8-3
8-4
8-5
8-6


9

Building a Summary Report
Prerequisites for this example...................................................................................................
Create a data model and a group above layout ....................................................................

Format fields ................................................................................................................................
Examine the summary column properties (optional)............................................................
Summary ......................................................................................................................................

9.1
9.2
9.3
9.4
9.5

Part II
10

Building Group Reports

Building a Single-Query Group Report
10.1
10.2
10.2.1
10.2.2
10.2.3
10.3
10.3.1
10.3.2
10.4
10.4.1
10.4.2
10.5

11


10-2
10-2
10-3
10-5
10-6
10-8
10-8
10-9
10-10
10-10
10-11
10-11

Prerequisites for this example................................................................................................
Create a new report manually................................................................................................
Create a data model with a data link ....................................................................................
Use the Report Wizard to layout the data............................................................................
Format a field............................................................................................................................
Summary ...................................................................................................................................

11-3
11-3
11-3
11-5
11-7
11-8

Building an Across Group Report
12.1

12.2
12.3
12.4
12.5

13

Prerequisites for this example................................................................................................
Group report with one break column ...................................................................................
Create a data model with a break group and group left layout ................................
Format a field ....................................................................................................................
Use the Property Inspector to add white space............................................................
Group report with two break columns.................................................................................
Modify the data model.....................................................................................................
Redefault the layout .........................................................................................................
Group report with two break groups .................................................................................
Modify the data model...................................................................................................
Redefault the layout .......................................................................................................
Summary .................................................................................................................................

Building a Two-Query Group Report
11.1
11.2
11.3
11.4
11.5
11.6

12


9-2
9-3
9-5
9-7
9-8

Prerequisites for this example................................................................................................
Create two queries ...................................................................................................................
Create the default layout.........................................................................................................
Run your report to paper ........................................................................................................
Summary ...................................................................................................................................

12-2
12-2
12-3
12-4
12-5

Building a Group Left Summary Report
13.1
13.2
13.3
13.4
13.5
13.6

Prerequisites for this example................................................................................................
Create a new report manually................................................................................................
Create a data model with a data link ....................................................................................
Use the Paper Layout view to create two layouts...............................................................

Merge the two layouts.............................................................................................................
Format fields ...........................................................................................................................

13-2
13-2
13-3
13-5
13-8
13-10

xv


13.7

14

Building a Group Left Formula Report
14.1
14.2
14.3
14.3.1
14.3.2
14.3.3
14.4

Part III
15

Building Reports with Special Formatting


Prerequisites for this example................................................................................................
Create a query in the Data Model view ................................................................................
Create three summary columns.............................................................................................
Create the default layout using the Report Wizard............................................................
Modify the layout of the report .............................................................................................
Run your report to paper ........................................................................................................
Summary ...................................................................................................................................

Prerequisites for this example................................................................................................
Create a data model and a group left layout ......................................................................
Move a summary .....................................................................................................................
Add a page heading.................................................................................................................
Add white space and format fields .......................................................................................
Summary ...................................................................................................................................

Prerequisites for this example................................................................................................
Create a data model and a group left layout ......................................................................
Add summary columns for the header data........................................................................
Add a page heading.................................................................................................................
Summary ...................................................................................................................................

16-2
16-2
16-4
16-5
16-6
16-7

17-2

17-2
17-4
17-5
17-6

Building a Report with Graphics, Text, and Color
18.1
Prerequisites for this example................................................................................................
18.2
Create a simple report definition...........................................................................................
18.3
Modify the report in the Paper Layout view .......................................................................
18.3.1
Add a border around the report.....................................................................................
18.3.2
Change the font size and style ........................................................................................
18.3.3
Add bullets to your report...............................................................................................
18.3.4
Display a line between each record................................................................................

xvi

15-2
15-2
15-4
15-5
15-6
15-6
15-7


Building a Header with Database Values Report
17.1
17.2
17.3
17.4
17.5

18

14-2
14-2
14-3
14-4
14-5
14-5
14-6

Building a Header and Footer Report
16.1
16.2
16.3
16.4
16.5
16.6

17

Prerequisites for this example................................................................................................
Use the Report Wizard to create a simple report ................................................................

Create two formula columns..................................................................................................
Create a formula column to calculate the tax ...............................................................
Create a formula column that calculates customer order totals ................................
Add the formula columns to the report layout ............................................................
Summary ...................................................................................................................................

Building a Wrapped Field Report
15.1
15.2
15.3
15.4
15.5
15.6
15.7

16

Summary ................................................................................................................................. 13-11

18-2
18-2
18-4
18-5
18-6
18-7
18-8


18.3.5
Add a title to your report................................................................................................. 18-9

18.4
Summary ................................................................................................................................. 18-10

19

Building a Report that Renumbers Pages by Repeating Frame
19.1
19.2
19.3
19.4
19.5
19.6
19.7
19.8

20

20-2
20-2
20-4
20-5
20-5
20-6
20-8

Prerequisites for this example................................................................................................
Create the data model with two linked queries ..................................................................
Create a formula column and a summary column .............................................................
Create a formula column in the detail query................................................................
Create a summary column in the master query ...........................................................

Create the report layout ..........................................................................................................
Create the initial layout of your report..........................................................................
Add a format trigger to suppress labels ...............................................................................
Add text to display when no records display......................................................................
Summary .................................................................................................................................

21-2
21-2
21-4
21-4
21-4
21-5
21-5
21-6
21-7
21-10

Building a Conditional Form Letter Report
22.1
22.2
22.3
22.4
22.5

23

Prerequisites for this example................................................................................................
Create a data model and a layout .........................................................................................
Add a formula column............................................................................................................
Add a field ................................................................................................................................

Remove a redundant field ......................................................................................................
Suppress redundant values ....................................................................................................
Summary ...................................................................................................................................

Building a Report that Suppresses Labels
21.1
21.2
21.3
21.3.1
21.3.2
21.4
21.4.1
21.5
21.6
21.7

22

19-3
19-3
19-5
19-6
19-7
19-8
19-9
19-10

Building an Intermixed Fields Report
20.1
20.2

20.3
20.4
20.5
20.6
20.7

21

Prerequisites for this example................................................................................................
Create a data model and a group above layout .................................................................
Add a second query.................................................................................................................
Redefault the layout ................................................................................................................
Set properties and format fields.............................................................................................
Create new fields......................................................................................................................
Reference fields ........................................................................................................................
Summary .................................................................................................................................

Prerequisites for this example................................................................................................
Create the data model and layout .........................................................................................
Add additional text..................................................................................................................
Add logic for text .....................................................................................................................
Summary ...................................................................................................................................

22-3
22-3
22-4
22-5
22-7

Building a Report with Conditional Highlighting

23.1
23.2
23.3

Prerequisites for this example................................................................................................ 23-2
Create a basic tabular report .................................................................................................. 23-2
Add conditional formatting to the report ............................................................................ 23-6

xvii


23.4
23.5

24

Building a Report with Dynamic Graphics
24.1
24.1.1
24.1.2
24.2
24.3
24.3.1
24.3.2
24.4
24.5

Part IV
25


Building Matrix Reports

Prerequisites for this example................................................................................................
Create a single-query matrix ..................................................................................................
Create a multiple-query matrix..............................................................................................
Create a new report manually ........................................................................................
Create a data model with a cross product and a data link .........................................
Create the layout with the Report Wizard ....................................................................
Add summaries to the single-query matrix .........................................................................
Format monetary values .........................................................................................................
Add zeroes in place of blanks ................................................................................................
Add a grid ...............................................................................................................................
Summary .................................................................................................................................

25-2
25-2
25-4
25-4
25-4
25-6
25-7
25-8
25-9
25-12
25-12

Prerequisites for this example................................................................................................
Create a single-query matrix ..................................................................................................
Create a multiple-query matrix..............................................................................................
Create a new report manually ........................................................................................

Create a data model with a cross product and data links ..........................................
Create the layout with the Report Wizard ....................................................................
Create a multiple-query matrix with a break ....................................................................
Create a new report manually ......................................................................................
Create a data model with a cross product and data links ........................................
Create the layout with the Report Wizard ..................................................................
Format monetary values .......................................................................................................
Summary .................................................................................................................................

26-3
26-3
26-5
26-5
26-5
26-8
26-10
26-10
26-10
26-13
26-15
26-15

Building a Matrix with Group Above Report
27.1
27.2

xviii

24-2
24-2

24-2
24-2
24-4
24-4
24-5
24-6
24-7

Building a Nested Matrix Report
26.1
26.2
26.3
26.3.1
26.3.2
26.3.3
26.4
26.4.1
26.4.2
26.4.3
26.5
26.6

27

Prerequisites for this example................................................................................................
Access to the data source and installing the Pictures table ........................................
Graphics for the report.....................................................................................................
Create the data model with two linked queries ..................................................................
Create the layout of the report ...............................................................................................
Create the initial layout of your report using the Report Wizard .............................

Modify the layout of your report ...................................................................................
Run your report to paper ........................................................................................................
Summary ...................................................................................................................................

Building a Matrix Report
25.1
25.2
25.3
25.3.1
25.3.2
25.3.3
25.4
25.5
25.6
25.7
25.8

26

Examine the conditional format trigger code ...................................................................... 23-8
Summary ................................................................................................................................... 23-9

Prerequisites for this example................................................................................................ 27-2
Create a matrix group data model and layout .................................................................... 27-2


Add labels and lines for summaries......................................................................................
Add space between groups ....................................................................................................
Create a Web layout ................................................................................................................
Summary ...................................................................................................................................


27.3
27.4
27.5
27.6

Part V
28

Building Reports for Business Cases

Building a Time Series Calculations Report
28.1
28.2
28.3
28.4

29

28-2
28-2
28-4
28-6

Prerequisites for this example................................................................................................
Create a query and the layout ................................................................................................
Modify the Web source of your JSP report ..........................................................................
Modify your JSP report to display in Microsoft Excel........................................................
Summary ...................................................................................................................................


29-3
29-3
29-4
29-6
29-8

Building a Report with Aggregate Data
30.1
30.2
30.3
30.4

31

Prerequisites for this example................................................................................................
Create a query and the layout ................................................................................................
Modify the Web source of your JSP report ..........................................................................
Summary ...................................................................................................................................

Building a Report for Spreadsheet Output
29.1
29.2
29.3
29.4
29.5

30

27-4
27-5

27-6
27-7

Prerequisites for this example................................................................................................
Create a query and the layout ................................................................................................
Modify the Web source of your JSP report ..........................................................................
Summary ...................................................................................................................................

30-2
30-2
30-6
30-7

Building a Check Printing Report with Spelled-Out Cash Amounts
31.1
31.2
31.3
31.3.1
31.3.2
31.4
31.5
31.5.1
31.5.2
31.5.3
31.5.4
31.5.5
31.6
31.6.1
31.6.2
31.7


Prerequisites for this example................................................................................................
Create a report using the Report Wizard .............................................................................
Create a formula column that returns the spelled-out cash amounts..............................
Create a PL/SQL function ...............................................................................................
Create a formula column in your data model ..............................................................
Create a query that will return the items in the order........................................................
Import a check image and arrange fields for printing......................................................
Rearrange the layout objects .........................................................................................
Import the blank check image.......................................................................................
Set up the check printing fields ....................................................................................
Rearrange the new fields according to the blank check image ................................
Modify the look and feel of the check..........................................................................
Create a check stub with payment information and order details .................................
Create a check stub in the Paper Design view............................................................
Add order details to the check stub .............................................................................
Summary .................................................................................................................................

31-3
31-3
31-4
31-5
31-6
31-8
31-10
31-10
31-11
31-11
31-14
31-15

31-16
31-16
31-21
31-23

xix


32

Building a Report Using a Preprinted Form
32.1
32.2
32.2.1
32.2.2
32.3
32.3.1
32.3.2
32.3.3
32.3.4
32.4
32.5
32.6

33

Prerequisites for this example................................................................................................
Create a new report manually................................................................................................
Create a data model with a data link ....................................................................................
Create summary and formula columns................................................................................

Prepare the layout....................................................................................................................
Insert invoice information ......................................................................................................
Summary .................................................................................................................................

Prerequisites for this example................................................................................................
Create a data model and tabular layout ...............................................................................
Create ranking logic for top number of customers .............................................................
Add a layout object for a parameter......................................................................................
Create a Parameter Form ........................................................................................................
Add a percentage ranking ......................................................................................................
Summary .................................................................................................................................

34-2
34-2
34-3
34-5
34-6
34-7
34-10

Building a Paper Report with a Simple Table of Contents and Index
35.1
Prerequisites for this example................................................................................................
35.2
Create a simple table of contents ...........................................................................................
35.2.1
Create a table in the database to hold the TOC data ...................................................
35.2.2
Create a group above report ..........................................................................................
35.2.3

Create an After Parameter Form trigger and a format trigger...................................
35.2.3.1
Create an After Parameter Form trigger ................................................................
35.2.3.2
Create a format trigger..............................................................................................
35.2.4
Create a second query in the data model ......................................................................
35.2.5
Create a report block to display the table of contents .................................................
35.2.6
Run your simple table of contents report to paper......................................................
35.3
Create an index.......................................................................................................................
35.3.1
Create a table in the database to hold the information for the index......................
35.3.2
Create a format trigger...................................................................................................

xx

33-3
33-3
33-3
33-5
33-7
33-7
33-11

Building a Ranking Report
34.1

34.2
34.3
34.4
34.5
34.6
34.7

35

32-2
32-3
32-3
32-5
32-7
32-7
32-8
32-9
32-10
32-12
32-14
32-16

Building an Invoice Report
33.1
33.2
33.3
33.4
33.5
33.6
33.7


34

Prerequisites for this example................................................................................................
Manually create the data model for your report .................................................................
Create the queries .............................................................................................................
Modify your data model..................................................................................................
Create the layout for your report...........................................................................................
Set up your report layout ................................................................................................
Create an address label for your form ...........................................................................
Add the order item details to your report.....................................................................
Adjust the layout and add summaries ........................................................................
Format your report in the Paper Design view...................................................................
Add page numbers (optional)..............................................................................................
Summary .................................................................................................................................

35-3
35-4
35-4
35-4
35-6
35-6
35-7
35-7
35-9
35-9
35-11
35-11
35-12



35.3.3
Add a query to the data model.....................................................................................
35.3.4
Create a report block to display the index in the Trailer section.............................
35.3.5
Run your report to paper...............................................................................................
35.4
Summary .................................................................................................................................

36

Building a Paper Report with a Multilevel Table of Contents
36.1
36.2
36.3
36.3.1
36.3.2
36.4
36.5
36.6
36.7

37

36-3
36-3
36-4
36-4
36-5

36-6
36-7
36-7
36-9

Prerequisites for this example................................................................................................
Set up an existing report for bursting ..................................................................................
Edit the distribution XML definition ....................................................................................
Run the report...........................................................................................................................
Summary ...................................................................................................................................

37-2
37-2
37-3
37-4
37-5

Building a Report with Multibyte Characters for PDF Output
38.1
38.2
38.3
38.4
38.5

Part VI
39

Prerequisites for this example................................................................................................
Create a table in the database to hold the TOC data ..........................................................
Create an After Parameter Form trigger and a format trigger ..........................................

Create an After Parameter Form trigger .......................................................................
Create a format trigger.....................................................................................................
Create a second query in the data model .............................................................................
Create a report block to display the table of contents ........................................................
Run your multilevel table of contents report to paper .......................................................
Summary ...................................................................................................................................

Bursting and Distributing a Report
37.1
37.2
37.3
37.4
37.5

38

35-12
35-13
35-14
35-15

Prerequisites for this example................................................................................................
Create the query and paper layout for a multibyte report ...............................................
Display multibyte characters in the report...........................................................................
Create a PDF document of your report ...............................................................................
Summary .................................................................................................................................

38-3
38-4
38-7

38-9
38-10

Building Reports with PL/SQL and Java

Building a Report that Includes PL/SQL
39.1
39.2
39.3
39.3.1
39.3.2
39.3.3
39.3.4
39.4
39.5
39.5.1
39.5.2
39.5.3

Prerequisites for this example................................................................................................
Create a new PL/SQL library ................................................................................................
Create the report definition ....................................................................................................
Create a query ...................................................................................................................
Create a formula column that calculates bonuses........................................................
Create a report-level function that calculates total compensation ............................
Create a second formula column for total compensation ...........................................
Create the report layout using the Report Block Wizard...................................................
Add vertical space between records ...................................................................................
Create a user parameter.................................................................................................
Create a summary column that counts the number of records ...............................

Modify the layout ...........................................................................................................

39-2
39-2
39-4
39-4
39-5
39-7
39-8
39-9
39-12
39-12
39-12
39-13

xxi


39.5.4
Create a format trigger................................................................................................... 39-14
39.6
Run your report to paper ...................................................................................................... 39-14
39.7
Summary ................................................................................................................................. 39-15

40

Building a Paper Report with REF CURSORs
40.1
40.2

40.3
40.4
40.5
40.6
40.7
40.8
40.9
40.10

41

Prerequisites for this example................................................................................................
Create a Parameter Form in HTML.......................................................................................
Modify the HTML Parameter Form in Reports Builder.....................................................
Create a data model manually for the Parameter Form .............................................
Create a dynamic LOV in the Parameter Form ............................................................
Run the Parameter Form report to the Web .................................................................
Set up the target report ...........................................................................................................
Deploy the JSP Parameter Form and the target report.......................................................
Summary .................................................................................................................................

41-3
41-3
41-4
41-5
41-5
41-7
41-8
41-8
41-11


Building a Report with a Barcode
42.1
42.1.1
42.2
42.2.1
42.2.2
42.2.3
42.2.4
42.2.5
42.2.6
42.2.7
42.3
42.3.1
42.3.2
42.3.3
42.3.4
42.4

xxii

40-3
40-3
40-5
40-6
40-8
40-9
40-10
40-11
40-13

40-14

Building a Simple Parameter Form for a JSP-based Web Report
41.1
41.2
41.3
41.3.1
41.3.2
41.3.3
41.4
41.5
41.6

42

Prerequisites for this example................................................................................................
Define a REF CURSOR type ...................................................................................................
Create a REF CURSOR query.................................................................................................
Refine the data model..............................................................................................................
Create links between REF CURSOR queries........................................................................
Add summary columns ..........................................................................................................
Create a layout........................................................................................................................
Move the SELECT statements into packages.....................................................................
Move the packages into a library.........................................................................................
Summary .................................................................................................................................

Prerequisites for this example................................................................................................
Update the REPORTS_CLASSPATH environment variable......................................
Create a barcode report for paper .........................................................................................
Import the Java classes into Reports Builder ................................................................

Create a package to store your information..................................................................
Create a Before Report trigger ........................................................................................
Create a query in the Data Model view ........................................................................
Create a formula column to retrieve the barcode image ............................................
Create a formula column that returns the order total .................................................
Create a layout for your report .....................................................................................
Create a barcode report for the Web ...................................................................................
Create a query in an existing HTML file .....................................................................
Create three formula columns in your data model ...................................................
Initialize the barcode JavaBean and set its properties...............................................
Run your report to the Web ..........................................................................................
Summary .................................................................................................................................

42-3
42-3
42-4
42-4
42-5
42-6
42-6
42-8
42-9
42-10
42-12
42-13
42-14
42-16
42-18
42-19



43

Building an Accessible JSP-based Web Report

Part VII
44

Building a Report with an XML Pluggable Data Source
44.1
44.2
44.2.1
44.2.2
44.2.3
44.2.4
44.2.5
44.2.6
44.3
44.4

45

Prerequisites for this example................................................................................................
Create a report manually with SQL and XML queries.......................................................
Create a SQL query for your new report.......................................................................
Create an XML query to access your XML data source ..............................................
Create a data link between two queries ........................................................................
Create a layout for your report using the Report Wizard ..........................................
Apply alternating row colors to your report ..............................................................
Filter your XML data using a group filter...................................................................

Run your report to paper ......................................................................................................
Summary .................................................................................................................................

44-6
44-6
44-6
44-7
44-8
44-9
44-10
44-12
44-14
44-15

Building a Report with a Text Pluggable Data Source
45.1
45.2
45.3
45.4

46

Building Reports with Pluggable Data Sources

Prerequisites for this example................................................................................................
Set up the textpds.conf file .....................................................................................................
Use the Report Wizard to create a report .............................................................................
Summary ...................................................................................................................................

45-2

45-2
45-3
45-5

Building a Report with an OLAP Pluggable Data Source
46.1
Prerequisites for this example................................................................................................ 46-3
46.2
Create a new report based on OLAP data............................................................................ 46-3
46.2.1
Create a new simple report ............................................................................................. 46-3
46.2.2
Define the OLAP data source connection in the Connection Editor......................... 46-3
46.2.3
Specify connection details in the OLAP Connection tabbed page ............................ 46-5
46.2.4
Define the query to access OLAP data using the Query Wizard............................... 46-6
46.2.5
Specify row, column, and cell field details for a matrix report using the Report Wizard
............................................................................................................................................. 46-9
46.3
Format the report in the Paper Design view...................................................................... 46-11
46.4
Run your report to paper ...................................................................................................... 46-12
46.5
Summary ................................................................................................................................. 46-13

47

Building a Report Using Oracle Express Data

47.1
47.2
47.3
47.4
47.4.1
47.4.2
47.4.3
47.5
47.5.1

Prerequisites for this example................................................................................................
Define the Express query using the Report Wizard ...........................................................
Refine the Express query ........................................................................................................
Add summary columns and custom measures to the data model ...................................
Rename data objects .........................................................................................................
Create summary columns................................................................................................
Create a custom measure.................................................................................................
Enhance the report layout.....................................................................................................
Insert summary fields in the report .............................................................................

47-2
47-3
47-5
47-7
47-8
47-8
47-8
47-10
47-10


xxiii


47.5.2
Insert the custom measure field into the report .........................................................
47.5.3
Sort dimension values ....................................................................................................
47.5.4
Make format changes in the Paper Design view.......................................................
47.6
Summary .................................................................................................................................

A

Tool Palette and Toolbar Reference
A.1
A.2
A.3

Glossary
Index

xxiv

47-12
47-14
47-15
47-15

Main Toolbar .............................................................................................................................. A-1

Data Model View Tool Palette ................................................................................................. A-2
Paper Layout View Tool Palette .............................................................................................. A-3


Preface
This manual will help you learn about the extensive capabilities of Reports Builder
(the report-building component of Oracle Reports), how to build different types of
reports, and how to customize your reports to meet a wide variety of requirements.

Audience
This manual is intended for anyone who uses Oracle Reports to build reports. The
needs of both novice and advanced users are addressed. Following the step-by-step
instructions, you can build the example reports from start to finish. Each report that
you build will demonstrate how to use many of the powerful features in Reports
Builder.

Documentation Accessibility
Our goal is to make Oracle products, services, and supporting documentation
accessible, with good usability, to the disabled community. To that end, our
documentation includes features that make information available to users of assistive
technology. This documentation is available in HTML format, and contains markup to
facilitate access by the disabled community. Accessibility standards will continue to
evolve over time, and Oracle is actively engaged with other market-leading
technology vendors to address technical obstacles so that our documentation can be
accessible to all of our customers. For more information, visit the Oracle Accessibility
Program Web site at
/>Accessibility of Code Examples in Documentation
Screen readers may not always correctly read the code examples in this document. The
conventions for writing code require that closing braces should appear on an
otherwise empty line; however, some screen readers may not always read a line of text

that consists solely of a bracket or brace.
Accessibility of Links to External Web Sites in Documentation
This documentation may contain links to Web sites of other companies or
organizations that Oracle does not own or control. Oracle neither evaluates nor makes
any representations regarding the accessibility of these Web sites.

xxv


×