Did You Know? -- July 2002

By Hervé Deschamps, Oracle Corporation.



Here is a handy reminder on how to do an interactive SQL*Plus utility:

accept l_user      char PROMPT 'Enter username (e.g. SCOTT) : '
accept l_pwd       char PROMPT 'Enter the Password                                    : ' HIDE
accept l_conn      char PROMPT 'Enter connect string INCLUDING @ (press [Enter] for local db): '
connect &l_user/&l_pwd&l_conn

Reports: Generic design

An example of generic report:

You can create a query like;
select &p_col_1          customer_id,
       &p_col_2          customer_name
from   &p_table1
where  &p_where1.

The &stuff are parameters in the report and you can change their values (before they are evaluated).
For example, &p_table1 could contain "customers cust, cust_accounts  cacc,  cust_term cterms".

Reports: Anchors

You can view anchors in the reports navigator:
  - Click on the navigator window
  - Select menu option: Navigator: Navigator Options
  - Tab: Layout.
  - Check 'Anchoring Information'
  - Now expand the hierarchy to a place where you created an anchor.
  - See the new node: 'Anchoring Information'?

Reports: PCL5

Here are the common PCL5 Printer commands for the HP Lasetjet Printers .

 Job Control Commands

 Reset                EcE
 Number of Copies     Ec&l#X         1 to 999

 Page Control Commands

 Paper Source         Ec&l#H         0 = prints or ejects current page
                                     1 = Tray 2
                                     2 = manual feed, paper
                                     3 = manual feed, envelope
                                     4 = Tray 1
                                     5 = Tray 3
                                     6 = Envelope Feeder
                                     7 = auto select
                                     8 = Tray 4
                                     10-69 = external trays

 Paper Size           Ec&l#A         1 = Executive
                                     2 = Letter
                                     3 = Legal
                                     25 = A5
                                     26 = A4
                                     45 = B5-JIS
                                     80 = Monarch
                                     81 = Commercial 10
                                     90 = DL
                                     91 = International C5
                                     100 = B5
                                     101 = Custom

 Orientation           Ec&l#O        0 = Portrait
                                     1 = Landscape
                                     2 = Reverse Portrait
                                     3 = Reverse Landscape

 Top margin            Ec&l#E        # = number of lines

 Text Lenght           Ec&l#F        # = number of lines from to margin

 Font Selection

 Symbol Sets           Ec(#          8U = HP Roman-8 Symbol Set
                                     10U = IBM PC-8 ( Code page 437 )
                                     12U = IBM PC-850 ( Code page 850 )
                                     8 M = Math-8
                                     19U = Windows 3.1 Latin 1
                                     9E = Windows Latin2 ( Eastern Europe )
                                     5T = Windows Latin5 ( Turkey )
                                     579L = Wingdings Font

 Primary Spacing       Ec(s#P        0 = fixed
                                     1 = proportional

 Primary Pitch         Ec(s#H        # = characters/inch

 Set Pitch Mode        Ec&k#S        0 = 10
                                     4 = 12 (elite)
                                     2 = 16.5 - 16.7 (compressed)

 Primary Height        Ec(s#V        # = points

 Primary Style         Ec(s#S        0 = upright (solid)
                                     1 = italic
                                     4 = condensed
                                     5 = condensed italic

 Primary Stroke Wt.    Ec(s#B        0 = medium (book or text)
                                     1 = semi bold
                                     2 = bold
                                     3 = extra bold

 Typeface              Ec(s#T        Print a PCL 5e font list to view the command for each internal

More detail at:

There is a great general technical reference at:

Reports: Implicit Anchoring

A brief resume of the Manual's explanation of the algorithm is as follows:
  1. Every object will be anchored to its closest container unless the object lies within the push path of another object. In this instance, refer to point 2.  If the object is not placed within the push path of any object, it will be anchored from its upper-left corner to its closest container's upper-left corner.
  2. If an object is placed within the push path of another object, it will be anchored to that object.  If the growing direction is horizontal,  the object will be anchored from its upper-left corner to its anchoring object's upper-right corner.  If the growing direction is vertical,  the object will be anchored from its upper-left corner to its anchoring objects bottom-left corner.
  3. The container must fully enclose the object to be a valid container and, importantly, to be a true container, it must be placed behind the the object.
  4. The uppermost container is the page.
  5. The implicit anchoring algorithm will not overwrite any previously existing explicit anchors.

Reports: Postscript and ASCII. Unix vs. NT

On the Unix platform, the ar25runb executable is used for postscript printing. This executable resides in the $FND_TOP/bin directory.  If the executable is  not present, it can be recreated manually with the Oracle Applications utility  adrelink.

On the Windows NT platform, the r25run32.exe executable is used for both postscript and ASCII text printing.

Postscript printer definition files are required only on character-mode platforms like Unix. In a bitmap platform, like Windows NT, the SRW driver is  not used for printing postscript reports; however, the driver is used for ASCII text reports. Some generic postscript drivers are psport.prt for portrait,  psl132.prt for landscape, and psl180.prt for landwide.

Hervé Deschamps is a Technical Manager with Oracle Corporation. Over the years he has developed a number of applications using Oracle Development Tools and others.  He has an extensive experience of all phases of the development life cycle. He is also known in the technical community for his article publications centered around best custom development practices and for his user group presentations. You can reach him by e-mail at herve.deschamps@.oracle.com. He also maintains a web site full of articles, scripts, tips and techniques at http://www.iherve.com.