© 2007 by prentice hall10-1 introduction to oracle 10g chapter 10 creating and modifying reports...

42
© 2007 by Prentice Hall 10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

Upload: rosa-whitehead

Post on 16-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-1

Introduction to Oracle 10gChapter 10Creating and Modifying Reports

James Perry and Gerald Post

Page 2: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-2

Chapter Outline

• Introducing Reports Developer• Building and Modifying Reports• Enhancing a Report• Customizing Reports• Controlling Data in a Report• Creating Custom Templates• Customizing a Web Report

Page 3: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-3

10.1: Customers in a tabular report

Sample reports

Page 4: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-4

10.2: Grouped report shows sales by city and agent

Page 5: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-5

10.3: Matrix or cross tab report of sales by agent by month

Page 6: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-6

Developer User

Database server

Application serverReports

builderName.jsp

Report definition

Web browser

Report in HTML

10.4 Oracle reports services

Page 7: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-7

Report Header

Report Footer

Page Header

Page Footer

Detail

Break Header

Break Footer

10.5 Overall structure of a grouped report

Building and modifying reports

Page 8: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-8

Customer Header

Customer Footer

Detail

Detail

Sale Header: SaleID=1

Sale Footer: SaleID=1

Sale Header: SaleID=5

Sale Footer: SaleID=5

10.6 Nested groups from customer to sale to detail

Page 9: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-9

Sort

Conditions

Select All

10.7 Query builder for the City/Agent form

The Reports Builder

Page 10: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-10

10.8 Choosing the groupings for the report

Page 11: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-11

Format Options

Layout Displays Page Navigation

Run Web or Paper

10.9 Initial report for sales by city and agent

Page 12: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-12

Paper Layout button

10.10 Page layout window

Page 13: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-13

10.11 Using the Object Navigator to set vertical spacing

Page 14: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-14

Step through code

Group Frame

Group Footer

Group Header

Detail Group

10.12 The Object Navigator

Page 15: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-15

10.13 Choosing the fields for the matrix rows

Enhancing a report

Page 16: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-16

10.14 The initial matrix report

Page 17: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-17

Set Line Color

Add space

10.15 Adding a box to display grid lines in a matrix report

Page 18: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-18

Text boxes for totals

10.16 Text boxes for subtotal headings

Page 19: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-19

Choose a section to modify

10.17 Using the Report Wizard in reentrant mode to modify a report

Customizing reports

Page 20: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-20

10.18 Data model for the grouped report

Page 21: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-21

10.19 Initial data model for matrix report

Page 22: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-22

Create spaceAdd field

10.20 Adding a summary field

Page 23: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-23

10.21 Count field displayed on the report

Page 24: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-24

Select Magnify

Summary Column Data Link

Formula Column Cross Product

Placeholder Column SQL Query

Ref Cursor Query XML Query

JDBC Query Text Query

OLAP Query Express Server Query

10.22 Data Model toolbox

Page 25: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-25

Start with SQL

Data Link to connect

10.23 The master-detail data model

Creating a report manually

Page 26: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-26

10.24 Paper Layout of the Listings and Offers report

Page 27: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-27

10.25 Design Layout of the Listings and Offers report

Page 28: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-28

10.26 Design Layout with the house photo

Page 29: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-29

Table 10.1 System parameters

Parameter Name Description

COPIES The number of copies to print. Default = 1.

DESFORMAT The output format and is usually set as PDF, HTML, HTMLCSS, RTF, XLM, or DELIMITED. It can also be the printer definition. Default = dflt.

DESNAME The name of the output device, such as a file name, printer name, or e-mail address. Default is blank.

DESTYPE The type of output device, such as screen, file, printer, mail, sysout, cache, localfile, or preview. Default=Screen.

MODE Whether to print the report in character or bitmap format. Default = Default.

ORIENTATION The paper layout is portrait or landscape. Default = Default..

PRINTJOB Controls whether the Print Job dialog box appears before the report is run. Default = Yes. However, the dialog is never called from within the Reports Builder.

Page 30: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-30

10.27 Parameter List of Values query

Creating user parameters

Page 31: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-31

Choose a valueRun the report

10.28 User parameter form

Page 32: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-32

10.29 The matrix report with many houses for sale

Page 33: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-33

Choose template type

Four frame levels

Data labels and fields

Show margin items

10.30 Initial template layout

Designing custom templates

Page 34: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-34

10.31 A brighter report with the new layout

Page 35: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-35

10.32 Initial Web view of Sales by City and Agent

Customizing Web reports

Page 36: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-36

Database server

Application server

Report definition

Java links<HTML><LINK rel=“StyleSheet”… /><TABLE …>

<rw: database calls >

</TABLE>

</HTML>

Web server withJava Engine

.OraTable

.OraColumnHeader

.OraCellDate

.OraHEader

.OraCellNumber

.OraCellText

.OraHeaderSub

.OraHeaderSubSub

.OraRowHeader

.OraTotalText

.OraTotalNumberStyle sheet

HTML page

SQL and data

10.33 Dynamic HTML report components

Page 37: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-37

Java set up

Style sheet link

Logo file

Page title

10.34 A portion of the Web definition file

Page 38: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-38

Main loop for group 1 (City)

Level 2 group (Agent)

Detail loop (Listing)

10.35 The data area of the Web definition file

Page 39: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-39

White background

Blue text and yellow background

10.36 Style sheet changes

Page 40: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-40

White background

Brighter heading

10.37 The new Web report

Page 41: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-41

10.38 A chart at the bottom of the Web report

Page 42: © 2007 by Prentice Hall10-1 Introduction to Oracle 10g Chapter 10 Creating and Modifying Reports James Perry and Gerald Post

© 2007 by Prentice Hall10-42

10.39 Inserting a chart