Customizing Printing Support in Oracle E-Business Suite

Oracle E-Business Suite provides numerous predefined printer types with which you can identify your printers, as well as print styles that define the dimensions of Oracle Reports output files, and printer drivers that instruct the various printer types how to output the selected print style.

Use the Printer Types form to query the combinations of print style and printer driver that support each type of printer you have.

Attention: Predefined printing components may have to be modified for different printer types and/or operating platforms.

For example, if a blank page is being printed after each printed page, the number of rows defined for the print style may need to be reduced, or an escape sequence that is being interpreted differently, creating a page eject command, may have to be rewritten.

Verify and, if necessary, Customize Printer Driver Definitions

Upon installation for any printer type you are using, verify your printer driver definitions, particularly the following:

If you need to define a new print style, verify the printer driver you assign to the new print style, for any printer type you use.

Verify and, if necessary, Customize Oracle Reports SRW Drivers

If you have a printer type that does not properly interpret the control characters in the SRW driver files that set page breaks, bold on/off and underline on/off attributes in your Oracle Reports files, you can copy the SRW driver file and modify it.

Creating Custom Printer Drivers

If necessary, edit the Initialization string and the Reset string for the printer type you are using. Refer to your printer's user guide for instructions. The Initialization and Reset fields appear on the Printer Drivers form.

Edit your Initialization string or Reset string if:

Printer Driver Methods

There are three methods to invoke a printer driver:

Command The concurrent manager can issue an operating system print command and its arguments.
An operating system print command, along with all its arguments, is entered in the Arguments field of the Printer Drivers form.
Program The concurrent manager can call a custom print program and pass arguments to the program.
The name of a custom print program is entered in the Program Name field and any arguments to be passed to the program are entered in the Arguments field of the Printer Drivers form.
Subroutine The concurrent manager can call a predefined Oracle E-Business Suite subroutine that passes a print command and arguments to the printer via the operating system.
A subroutine is predefined by Oracle E-Business Suite, and the name is entered in the Program Name field of the Printer Drivers form.
The arguments field is disregarded when the driver method is Subroutine. However, the concurrent manager reads the Initialization and Reset escape sequences.
On UNIX systems, the subroutine method, unlike the command method, does not start an operating system shell along with the print command.

Example - Using the Program Driver Method

The Program driver method allows customers to define their own custom print programs. For example, your company might want to write a custom program that opens a file, allows the file to be edited and saved under a second filename, then sends the second (edited) file on to the printer by issuing the print command. This method of issuing print commands is called a filter.

Location for Custom Print Programs

To call a custom print program using the Printer Drivers form, the program name, including the full path to the program, should be entered in the Program Name field.

The path to the program name is not necessary if the program's location can be identified by the operating system's PATH environment variable (i.e., is in the $PATH variable name).

For platforms where the equivalent of a $PATH variable doesn't exist, then use the full path name. A path can be up to 255 characters.

Custom print programs are not registered as concurrent programs with Oracle Application Object Library, but are called after the concurrent process has completed.

Using Operating System Shell Scripts

For operating system shell scripts, the printer driver method can be either command or program, as long as you populate the argument field correctly.

The script for a command shell procedure should reside in:

$FND_TOP/$APPLBIN.  

Arguments That a Concurrent Manager Can Supply Values For

The concurrent manager can supply four different values as arguments to the operating system print command it issues, or to a custom print program that it calls. An example of using these values as arguments follows.

Example - Entering a Print Command and Arguments

In this example, the UNIX print command "lp" is entered along with the arguments that a concurrent manager can supply values for. While print commands vary, the tokens for which values are retrieved are always the same.

Because print commands are operating system dependent, please refer to Oracle E-Business Suite Installation Guide: Using Rapid Install .

Example - Printer Drivers Form's Arguments field:

lp -d$PROFILES$.PRINTER -n$PROFILES$.CONC_COPIES -t"$PROFILES$.TITLE" $PROFILES$.FILENAME

The following table lists arguments and their contents for the UNIX lp print command:

Argument Syntax Token and Value Retrieved
-d$PROFILES$.PRINTER -d calls out the destination printer. $PROFILES$.PRINTER retrieves the operating system name of the printer associated with the request.
-n$PROFILES$.CONC_COPIES -n calls out the number of copies to print. $PROFILES$.CONC_COPIES retrieves the value of the profile option Concurrent:Report Copies, unless this value is updated at runtime.
-t"$PROFILES$.TITLE" -t calls out the report title to print on a banner or header page. "$PROFILES$.TITLE" retrieves the title of the output file, typically titled as Application username.Request ID. For example, if user John Smith ran a report whose concurrent request ID was 64225, the title would be JSMITH.64225. This is operating system dependent.
$PROFILES$.FILENAME $PROFILES$.FILENAME calls out the filename of the report to be printed. The value retrieved is the output file name, including the path to the file.
Note that this file is a temporary file created from information from the Printer Driver definition (from the Printer Drivers window) and the actual output for the report.

In addition, the following table lists arguments and their contents in the cases of an original print request and reprint requests:

Argument Syntax Original Print Request Value Retrieved Reprint Value Retrieved
$PROFILE$.ORIGREQID Request ID. Original request ID.
$PROFILE$.ORIGUSERNAME User name. Original user name.
$PROFILE$.REPREQID 0 (zero) Reprint request ID.
$PROFILE$.REPUSERNAME NULL Reprint request user name.
$PROFILE$.OUTFILENAME Output file path and filename. Output file path and filename.
Note that the file here contains only the report output.
$PROFILE$.OUTFILEHOST Host name. Host name.

Using Standard Input

When Standard Input is set to Yes, the printer driver accepts standard input, so you can feed a report's output directly to the printer from standard input. Two examples of using standard input are:

The Standard Input field should be set to No when the Driver Method is set to Program or Subroutine. Unless the program accepts standard input, the Standard Input field should always be set to No.

Attention: When Standard Input is set to No, the print command issued by the concurrent manager runs asynchronously. That is, the concurrent manager issues the command, and does not wait for an operating system response.

Using Initialization and Reset Strings

Use the initialization and reset strings to set and reset the orientation, character set and line density for your printer.

Initialization and reset strings consist of control characters and escape sequences.

For nonprintable characters, you may represent their value in octal mode. For example, 0x26 is represented as " /046 ". As an example, if you need to represent the escape sequence:

^ [ ^ L ^ [ l 6 D ( 0 x 26 )

you can represent it as:

/ e ^ L / e l 6 D / 0 4 6

Using a Spool File

When Spool File is set to No, then a temporary file is created where the initialization and reset strings are inserted, and the file is sent to the print command or program.

Set the Spool File to Yes only if the print program creates its own temporary file. This option is recommended when using the Program driver method and the print program creates its own temporary file.

This option helps to reduce the creation of temporary files, since the concurrent manager will not create a temporary file when Spool File is set to Yes.

When Spool File is set to Yes, it is recommended that the:

This option does not apply to the Subroutine driver method.

Creating Custom SRW Drivers

SRW drivers are read by Oracle Reports when a report is generated, and insert control characters that tell the destination printer where to set page breaks, and which characters to format as bold or underlined.

SRW drivers only pertain to Oracle Reports output files. An SRW driver is used during the generation of a report. A printer driver is used when the completed output file is sent to the printer.

SRW drivers are designed for the DEC LN03 printer, and all printers that understand the same control characters as the LN03.

Location and Content of SRW Driver Files

SRW driver files reside in $FND_TOP/$APPLREP, and have the file extension ".prt". The predefined SRW file names are:

Creating a Custom SRW Driver

You can customize any of the SRW driver files to support a printer type that is not correctly interpreting the control characters used to set page breaks and format text as bold or underlined in Oracle Reports files.

For example, you may need to change the control characters that instruct the printer to set a page break.

on an LN03	on an XYZ LaserInk   
new page ...	^L 	^[E 

If you need to change formatting control characters for page breaks, underlined text, or bold text in Oracle Reports:

SRW Drivers - Print Styles and Printer Drivers

When the concurrent manager calls Oracle Reports to run a report, the SRW driver name is passed as a parameter to Oracle Reports.

The SRW driver is not required because some customers might be using styles or printer drivers for non-Oracle Reports programs.

The SRW driver name you enter in the Print Styles and Printer Drivers forms is used in slightly different ways depending on whether you are printing or simply viewing the report.

If you run an Oracle Reports program without printing the output file, the SRW driver associated with the report's print style is used.

If you run an Oracle Reports program and print the output file, the SRW driver that is correct for the destination printer type is chosen by selecting the SRW driver associated with the printer driver.

Related Topics