Escolar Documentos
Profissional Documentos
Cultura Documentos
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Chapter 1
Composite Default screen
Blind Folio 1:v
Contents
FOREWORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XXI
ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XXIII
PART I
Overview
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Why Don’t They Use Oracle Developer? . . . . . . . . . . . . . . . . . . . . . . . . 4
The Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
The Scope of the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Web Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
What Does this Book Cover? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Why Discuss Standards? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
The Version Number Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Who Should Read this Book? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
How this Book Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Where Do You Go from Here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Strategies for Getting More Information . . . . . . . . . . . . . . . . . . . . 13
Oracle User Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
A Review of the Developer Forms Data Architecture . . . . . . . . . . . . . . . 14
Sample Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:58:57 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:vi
PART II
Basic Developer Standards
3 SQL and PL/SQL Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Why Coding Standards? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Readability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Enforcing the Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Top 10 Reasons to Not Use Code Standards . . . . . . . . . . . . . . . . 66
What Is the Answer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
The Tool Helps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
General Coding Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Maximum Length of 30 Characters . . . . . . . . . . . . . . . . . . . . . . . 69
Three Spaces for Indenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Uppercase for Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Lowercase for User-Defined Elements . . . . . . . . . . . . . . . . . . . . . 71
Maximum Line Length of 80 Characters . . . . . . . . . . . . . . . . . . . 71
Monospaced Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
One Thing per Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Comments for Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Take Database Object Names into Account . . . . . . . . . . . . . . . . 76
SQL Coding Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Upper- and Lowercase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
White Space and Indenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Commenting the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Organization of Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:58:58 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:vii
Contents vii
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:58:58 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:viii
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:58:59 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:ix
Contents ix
PART III
Forms Templates
10 Forms Template Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Forms and VRAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
What Is a Template Form? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Benefits of Template Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Drawbacks of Template Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
What Do You Put in the Template? . . . . . . . . . . . . . . . . . . . . . . . 240
Form Builder Features Used in the Template . . . . . . . . . . . . . . . . . . . . . 251
Template Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Subclasses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Object Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Object Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Template System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
How to Use the Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
11 Constructing the Forms Template System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
The Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
The Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Where to Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
The RAD Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Summary of Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:58:59 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:x
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:58:59 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xi
Contents xi
PART IV
Advanced Forms Topics
13 Deploying Forms on the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
The Web-Deployed Forms Environment . . . . . . . . . . . . . . . . . . . . . . . . . 352
The Java Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
The Middle Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
The Web-Deployed Forms Runtime . . . . . . . . . . . . . . . . . . . . . . 355
The Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
The Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Oracle Information Manager Documents . . . . . . . . . . . . . . . . . . . . . . . . 361
General Advice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Design for the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Test for the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Partition Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Know What “Thin Client” Means . . . . . . . . . . . . . . . . . . . . . . . . 364
Set User Expectations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Recompile the Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Simplify Your Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Use a Certified Client JVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Set Up the Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Techniques and Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Operating System Concerns . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Reducing Network Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Design Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Limitations and Work-Arounds . . . . . . . . . . . . . . . . . . . . . . . . . . 377
14 Forms Help Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
How Much Help? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
To What Level? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
How Much Content? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Native Forms Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Table-Based Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Components of the Help System . . . . . . . . . . . . . . . . . . . . . . . . . 387
The Query Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Enhancements to This System . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:00 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xii
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:00 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xiii
Contents xiii
PART V
Reports Topics
18 Reports—An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
Report Builder Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Layout Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Parameter Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Live Previewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Advanced and Underused Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Lexical Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Built-in PL/SQL Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
Report Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Building the Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Summary and Formula Columns . . . . . . . . . . . . . . . . . . . . . . . . . 465
Layout Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
Live Previewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Object Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Live Previewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
Layout Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Parameter Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Report Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Program Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
Attached Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
External SQL Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
PL/SQL Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Debug Actions and Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Built-in Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
Database Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
19 The Reports Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Crafting the Query—Keep It Simple! . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Query Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Multiple Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Using Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
Aliasing Column Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
Selecting PL/SQL Functions Within Queries . . . . . . . . . . . . . . . . 492
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:00 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xiv
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:01 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xv
Contents xv
PART VI
Developer Tips and Techniques
23 Interview Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Oracle Developer Expertise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
About the Interview Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
Oracle Forms Interview Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
Forms Beginner Questions—
Basic Product Functionality (5 points each) . . . . . . . . . . . . . . . 565
Forms Intermediate Questions (10 points each) . . . . . . . . . . . . . . 573
Forms Advanced Questions (20 points each) . . . . . . . . . . . . . . . . 577
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:01 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xvi
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:02 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xvii
Contents xvii
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:02 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xviii
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:02 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xix
Contents xix
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:03 PM
ORACLE
Color profile: Generic CMYK printer profile Series / Oracle Developer Advanced Forms & Reports / Brown / 2048-7 / Front Matter
Composite Default screen
Blind Folio FM:xx
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811
Q:\Oracle8\048-7\fm.vp
Tuesday, October 12, 1999 2:59:03 PM