Chapter D 5 : Configuring for the Workstation: Mouse, Display, and Printers
This chapter explains how to use a mouse, high-density screens, and a variety of printers with Advanced Revelation. In addition, there is information on how to change printer and display attributes of R/BASIC reports.
Using High-Density Screens
Advanced Revelation supports high-density EGA and VGA screens. In addition to the standard 25 line by 80 character screen, you have the following options (all screens are still 80 characters wide):
Monitor Type | Number of Lines |
---|---|
EGA | 43 |
VGA | 43 |
50 |
From the Video Display Parameters window (Management-Hardware-Display- Environment), press [F2] at the Video Display Mode prompt, select an option, and press [F9] to save the change. To activate the change, you must either log out of Advanced Revelation and log back on, or execute the TCL command RESET from the first level TCL.
If you are logged into the SYSPROG account, you can change other environments on the system by pressing [Shift-F1] and choosing an environment from the popup.
If the option you select will not work with your monitor, a warning message will display. You will be allowed to continue, however, under the assumption that you are changing the environment for a machine with the appropriate video adapter.
If you select an option that is incompatible with your monitor type, the display will default to 25 lines by 80 characters when you next log on or reset.
Warning! Using higher density video display modes, you can create a window that is 43 or 50 lines deep. If this window is then displayed on a 25 line screen, the results are unpredictable. To ensure accurate display on all screens, do your window development on a standard 25 line monitor.
Using a Mouse with Advanced Revelation
You can use a mouse to move the cursor in data entry windows, the Editor, and Paint, and to move the highlight in menus and popups. For each environment, you can change the relationship between mouse buttons and Advanced Revelation keystrokes. In addition, you can change the mouse’s sensitivity, or how far the cursor or highlight moves for a given motion of the mouse.
What Is a Mouse Configuration?
A mouse configuration is a combination of characteristics that determine what the mouse buttons do and how fast the cursor moves. As you will discover when you first enable the mouse within Advanced Revelation, the system includes a default configuration. See “Enabling a Mouse” below.
You can create new mouse configurations and change their characteristics. As with other environment characteristics (for example, menu styles and video attributes), each environment can have a different mouse configuration.
Enabling a Mouse
You can turn on a mouse and select a mouse configuration for each environment from the Mouse Environment window:
- Log in as the SYSPROG user, and access the Mouse Environment window (Management-Hardware-Mouse-Environment).
- If you are not the SYSPROG user, you can only enable the mouse and change the mouse configuration for the current environment. If you want to enable the mouse for the current environment only, skip this step.
- Press [Shift-F1] and choose an environment from the popup. (The environment name will then display on the top line of the status line.)
- Enter “Yes” at the Enable mouse prompt.
- At the Mouse configuration prompt, press [F2] for a list of available configurations. Select a configuration and, back at the Mouse Environment window, press [F9] to save.
To activate the change, you must either log out of Advanced Revelation and log back on, or execute the TCL command RESET from the first level TCL.
Creating a New Mouse Configuration
If you want to modify mouse characteristics, you should copy the default mouse con- figuration record and then make changes to the copy. Mouse configuration records are stored in the SYSTEM file on the SYSPROG account.
For more information on changing mouse characteristics, see “Defining What Each Mouse Button Does” and “Changing Mouse Sensitivity” below.
Create a new mouse configuration by copying an existing configuration at the Record Copy window:
- Log into the SYSPROG account.
- Access the Record Copy window (Tools-Records-Record Copy).
- Copy an existing mouse configuration (for example, DEFAULT_MOUSE) to a new record name, name_MOUSE. Name is the name you will see when you enable the mouse at the Mouse Environment window and when you choose a configuration to modify at the Button Definitions and Sensitivity windows.
Defining What Each Mouse Button Does
To define which Advanced Revelation keystroke is activated by each mouse button:
- Access the Mouse Button Definitions window (Management-Hardware-Mouse-Button Definitions). If the mouse is hooked up properly and the mouse driver software is loaded, the top three prompts in this window will fill in automatically. If these prompts are blank, you can still change button definitions, but you will not be able to use the mouse. The Mouse Button Definitions window displays the mouse configuration for the current environment.
- If you are logged in as the SYSPROG user, you can edit the button definitions for other mouse configurations. Press [Shift-F1] and choose a mouse configuration from the popup.
- For each mouse button (or combination of buttons), enter the Advanced Revelation keystroke that should be activated by that button. Enclose the name of the keystroke in braces.
For example, if you want the left button on your mouse to activate [F9] (save) 2 at the Left prompt, enter:{F9}
If you do not know the name of a keystroke: put the cursor at the correct prompt, press [Ctrl- — ] (Control-Hyphen) to turn on the keystroke translator, press the key whose name you need, and the key name will display. Press [Ctrl- — ] again to turn off the keystroke translator.
For example, the following keystrokes will display, in braces, the name of the Escape key:{Ctrl - —] [Esc] [Ctrl- — ]
- When you have finished defining mouse buttons, press [F9] to save.
Changing Mouse Sensitivity
To change mouse sensitivity, you must set two characteristics: how much mouse motion equals one pixel and how many pixels equal one character, one line, or one menu option of cursor motion.
Rather than modify the default mouse configuration, you should create a new configuration and experiment on it. See “Creating a New Mouse Configuration” above.
Mouse motion is measured in mickeys. If you have a 200 dot per Mouse Motion Equals inch (DPI) mouse, one mickey is equal to 1/200th of an inch. On a 200 DPI mouse, if you move the mouse 1/10th of an inch, you have moved it 20 mickeys (.1 * 200 = 20).
If you have a 300 DPI mouse, one mickey is equal to 1/300th of an inch, and 1/10th of an inch is 30 mickeys (.1 * 300 = 30). The following examples assume a 200 DPI mouse.
In the Mouse Sensitivity window (Management-Hardware- Mouse-Sensitivity), the first two prompts specify how many mickeys equal one pixel. The higher you set the motion-to-pixel ratio, the farther you must move the mouse per pixel.
For example, a motion-to-pixel ratio of 20 means that you would have to move the mouse 1/10th of an inch (20/200) to move it one pixel. If the motion-to-pixel ratio were 50, you would have to move the mouse 1/4 inch (50/200) to move it one pixel. (Later you will set how many pixels equal one character or one line.)
The X Ratio prompt determines the number of mickeys per pixel horizontally (within a line), while the Y Ratio prompt determines the number of mickeys per pixel vertically (across lines).
Now that you have set the size of a pixel in mickeys, you must set the number of pixels per character (left or right) or per line (up or Character down). The number of pixels per character can be different for windows, the Editor, Paint, menus, and popups, both horizontally and vertically.
Still in the Mouse Sensitivity window, the prompts under “Pixel-to-character ratios” determine how many pixels (as set above) you must move the mouse to move the cursor one character, line, or menu option. For each option, use X to set the number of pixels per character horizontally (within a line), and Y to set the number of pixels per character vertically (across lines).
For example, if you set:
- The X and Y motion-to-pixel ratios to 20 (20 mickeys, or 1/10th of an inch per pixel).
- The X and Y pixel-to-character ratios for windows to 5.
you will have to move the mouse 1/2 inch (1/10th of an inch * 5 pixels) to move the cursor one character left or right, or one line up or down.
If you leave the motion-to-pixel ratios at 20 and change the pixel- to-character ratios to 10, you will have to move the cursor 1 inch (1/10th of an inch * 10 pixels) to move the cursor one character left or right, or one line up or down.
Using Printers with Advanced Revelation
Advanced Revelation enables you to select up to three printers for each environment. From these three printers, you can then choose an active printer, which is the printer that the system directs all printer output to. At any time, you can switch to another active printer.
Selecting Printers for an Environment
To select printers for an environment, select Management-Hardware-Printer- Environment from the Main menu:
For each printer (Printers 1 to 3), press [F2] from the Printer Type prompt. A popup appears listing the available system printers. Highlight a printer and press [Return].
1. If your printer does not appear in this popup, you have three options:
- Check your printer documentation to see if your printer can emulate one of these printers.
- If there is a Merge printer definition for your printer, you can convert that printer definition to a system printer definition. See “Converting Merge Printer Definitions to System Printer Definitions” below.
- You can create a printer definition using the Printer Definitions window (Management-Hard ware-Printer-Definitions from the Main menu). For more information on printer definitions, see “What is a Printer Definition?” and “Creating Printer Definitions” below.
2. You can also specify a port for each printer, though this is not necessary. If you do not specify a port, the system assumes LPT1,
3. Enter a default page width and height. If output is longer than Default Page Height, the system starts a new page. If output is wider than Default Page Width, text wraps onto the next line.
The system uses these values if no height and width were specified in the printer definition for the active printer.
If you are logged into the SYSPROG account, you can change other environments on the system by pressing [Shift-F1] and choosing an environment from the popup. .
Selecting the Active Printer
After you have selected the printers for your environment, you can select the active printer. This is the printer that all printer output is directed to until you change to another active printer.
Select Management-Hardware-Printer-Select from the Main menu. Highlight the printer that you want as the active printer and press [Return], or press [Esc] to leave the Select Active Printer window without changing the active printer.
What is a Printer Definition?
When you write an R/BASIC program that creates a report, you can control:
- Fonts and print styles for printer output.
- Display attributes for screen output.
You do so by inserting attribute codes into R/BASIC PRINT commands. Because no printer can interpret these attribute codes directly, the system must translate them into a language that a printer can interpret.
Advanced Revelation performs this translation using a printer definition, which acts like a bilingual dictionary. The system uses this dictionary to translate the attribute codes in PRINT commands into codes specific to your particular brand and model of printer. In general, each type of printer has its own language and requires a separate printer definition, or dictionary.
Each time you run the R/BASIC program and send output to the printer, Advanced Revelation:
- Checks to see if the printer definition for the active printer is available in memory. If so, the system skips to Step 4.
- Determines which printer is the active printer.
- Retrieves the printer definition for that printer and stores the definition in memory.
- Translates the attribute codes in the R/BASIC PRINT commands into codes specific to the active printer, using the printer definition for that printer.
The process is much the same for output that you send to the screen.
Creating Printer Definitions
If Advanced Revelation does not include a printer definition compatible with your printer, you need to create a new printer definition.
If you already have a Merge printer definition for your printer, you can convert that definition into a system printer definition. For more information, see “Converting Merge Printer Definitions to System Printer Definitions” below.
Access the Printer Definition window (Management-Hardware-Printer- Definitions from the Main menu).
Printer
At the Printer prompt, enter the name of your printer. Press [F2] for a list of existing printer definitions.
Page Height and Page Width
At the Page Height and Page Width prompts, enter the maximum page dimensions in lines and characters, respectively. If output is longer than Page Height, the system starts a new page. If output is wider than Page Width, text wraps onto the next line.
If you leave these prompts blank, the system uses the values in the Printer Environment window (Management-Hardware- Printer-Environment from the Main menu).
Print Styles
Suppose you want to print output in a special print style (for example, bold or italics). To do so, you must send a certain character string to the printer. Depending on your printer, you may also need to send another character string to stop printing in that print style.
These character strings differ from printer to printer. Check the printer manual to determine what strings turn on (and turn off) print styles for your printer.
For each prompt in the “Begin” column, enter the character string that makes your printer print in the corresponding print style. If the printer requires it, in the “End” column, enter the character string that causes your printer to stop printing in that print style.
Because different printers accept character strings in different formats, you can enter strings in three formats:
- Decimal: Enter the decimal values of characters, separated by spaces.
- Hexadecimal: Enter the hexadecimal values of the characters. Precede each value with a “\” (backslash), and separate values with a space.
- ASCII: Enter the character string enclosed in quotation marks.
Warning! Do not attempt to enter ASCII characters that have a decimal value lower than 33. These characters have no display equivalent and may cause corruption of the printer definition record. Instead, enter these characters in either their decimal or hexadecimal equivalents.
For example, if your printer requires that you send it the string “BOLD” before it will print in a bold font, you can enter any of the following values at the Bold prompt in the “Begin” column:
Character type | Value |
---|---|
ASCII | ‘BOLD’ or “BOLD” |
Decimal | 66 79 76 68 |
Hexadecimal | \42 \4F \4C \44 |
Mixed | ‘B’ 79 \4C ‘D’ |
Printer Control
There are three printer control prompts. Two of these prompts, Prelude and End of Job, are specific to PostScript printers.
Initialize
Some printers allow you to reset all values, including fonts, print styles, margins, page height, emulation mode, language set, etc., using one character string. If your printer performs this function, enter the appropriate character string at this prompt.
As with print styles, you can enter the character string in ASCII, decimal, or hexadecimal formats. See “Print styles” above.
Prelude and End of Job | These prompts are pre-defined for PostScript printers. |
Fonts |
font (for example, Helvetica or Times-Roman), you must send a certain character string to the printer. Depending on your printer, you may also have to send another character string to stop printing in that font.
Enter a description in the “Font Name” column to identify which fonts you have associated with which font numbers. The names. that you specify here also appear in the Display Attribute Translation window.
For each prompt in the “Begin” column, enter the character string that causes your printer to print in the corresponding font. If your printer requires it, in the “End” column, enter the character string that causes your printer to stop printing in that font.
For information on entering values in the “Begin” and “End” columns, see “Print styles” above.
Printer Processes
You may need to run network or printer-specific processes before you can print Advanced Revelation reports. Advanced Revelation executes those processes automatically if you specify them under Printer Processes.
At the Open and Close prompts, enter codes and commands appropriate to your system and applications.
For more information on printer processes, see “Running Printer and Network Initialization Processes” below.
For more information on codes and commands, see the chapter “Using Codes and Commands” in Developing an Application.
Running Printer and Network Initialization Processes
Your system may require that you run a special process before you can print on a network printer or even, in some cases, on a local printer. For example, many networks require you to execute a network command that routes printer output to a specific shared or local printer. In addition, when you change printers, you may have to run a process to stop printing on the first printer before you can begin printing on the second.
In most cases, Advanced Revelation executes these printer processes for you automatically if you include the appropriate codes and commands in the printer definition.
For information on including printer processes in printer definitions, see “Printer Processes” under “Creating Printer Definitions” above.
For information on printer processes for PostScript printers, see “Using PostScript Printers” below.
Types of Printer Processes
There are two types of printer processes:
- Open printer process: Use the open printer process to establish a connection to a network printer, to send PostScript printer output to a spool file, or to execute other device-specific open processes.
- Close printer process: Use the close printer process to close the connection to a network printer, to print PostScript printer output from a spool file, or to execute
other device-specific close processes.
Executing Printer Processes
Printer processes can be executed in any of the following three ways:
Method 1 | When you log onto Advanced Revelation, the system automatically runs the open print process for the default printer. |
Method 2 | When you switch the currently active printer, using either the Select Active Printer window or the TCL SETPRINTER command, the system executes: * The close printer process for the old active printer. * The open printer process for the new active printer. |
Method 3 |
- To run the open printer process, at TCL enter:
PRINTPROC OPEN
- To run the close printer process, at TCL enter:
PRINTPROC CLOSE
- To run the close printer process followed by the open printer process, at TCL enter:
PRINTPROC
This third option is especially useful when working with PostScript printers. For more information, see “Using PostScript Printers” below.
For more information on the TCL PRINTPROC command, see “PRINTPROC” in the chapter “TCL Command Reference” in TCL.
Printer Processes and Logging On
The system executes the code and command for the open printer process before executing the logon verb. As a result, files that are attached by the logon verb are not available for the open printer process. This might include a file that contains your R/BASIC programs.
If this presents a problem for your system, you have three alternatives (in descending order of desirability):
- Copy the program that is executed by the code and command into the VERBS file.
- Copy the entire programs file into the REVBOOT volume.
- Attach the programs file as part of the open printer process.
Printing Merge Reports
In Merge reports created prior to Advanced Revelation version 2.1, you could specify a printer at the Printer prompt in the Make Merge window (Design-Report- Merge). Enhancements to version 2.1 make Merge printers unnecessary, so the Printer prompt has largely been eliminated:
- If an existing Merge report definition includes a printer name at the Printer prompt, the prompt and printer name still display. The Merge report prints to that printer.
- If an existing Merge report definition does not include a printer name at the Printer prompt, the prompt no longer displays. The Merge report prints to the currently active printer.
- If you delete the printer name at the Printer prompt and press [F9] to save the Merge report definition, the Printer prompt disappears. Thereafter, the Merge report prints to the currently active printer.
- If you are creating a new Merge report in version 2.1, the Printer prompt does not display. The Merge report prints to the currently active printer.
Converting Merge Printer Definitions to System Printer Definitions
Prior to Advanced Revelation version 2.1, you could create Merge printer definitions that were comparable to Version 2.1 system printer definitions. These definitions, like system printer definitions, could be used to change fonts and print styles, but they were specific to Merge reports.
If you created a Merge printer definition for your printer, and that printer has no corresponding system printer definition, you can convert the Merge definition to a system definition:
- Access the Convert Merge Printer Definitions window by selecting Management-Hardware-Printer-Convert from the Main menu.
- At the Source File Name prompt, enter the name of the file that contains your Merge printer definitions.. Unless you have chosen another file, these definitions are stored in the file MRG.PRINTER.CONFIG.
- At the Record(s) prompt, press [F2] for a popup of the Merge printer definitions in the source file. Choose the definitions that you want to convert to system printer definitions, and press [F9] to return to the window.
- At the Option prompt, you have one option: (O). If any Merge printer definitions that you are converting have the same name as existing system printer definitions (in the PRINTER_CONFIG file), you can use the (O) option to overwrite the system printer definitions.
Using PostScript Printers
In most cases, printing reports from Advanced Revelation is completely automated. You just run the report and send it to a printer, and the system takes care of the rest.
PostScript printers are a little different from most printers, because they process output a page at a time rather than a line at a time. To compensate for this difference, Advanced Revelation sends all PostScript printer output to a spool file instead of sending it straight to the printer. When you print the contents of the spool file, the system formats this line-oriented output into pages for the printer.
Printing on a PostScript Printer
To print on a PostScript printer, follow these steps:
1. Open the spool file so Advanced Revelation can save data there. The spool file can be opened several ways:
- When you log on, if the default printer is a PostScript printer, the system automatically opens the file.
- The system also automatically opens a spool file if, during a session, you change the currently active printer to a PostScript printer. You can do so using either the Select Active Printer window (Management-Hardware-Printer-Select from the Main menu) or the TCL SETPRINTER command.
- Execute the following command at TCL:
PRINTPROC OPEN
The active printer must be a PostScript printer.
2. Run as many Advanced Revelation reports as you want. Until you close the spool file in Step 3, Advanced Revelation continues to send output to that file. The size of the file is limited only by the amount of available disk space.
Warning! While the spool file is open, do not use the TCL PDISK command to redirect output to a temporary file, or you may lose the data in the PostScript printer spool file.
3. When you are ready to print the contents of the spool file (either after each report or after a series of reports), close the spool file. As with opening the file, there are several ways to close it:
- Re-select the PostScript printer as the active printer using the Select Active Printer window.
- Re-select the PostScript printer using the TCL SETPRINTER command. At TCL enter:
SETPRINTER n
where n is the printer number in the Printer Environment window (Management-Hardware- Printer-Environment from the Main menu).
- Execute the TCL PRINTPROC command. To print the contents of the spool file and reopen the file for more output, at TCL enter:
PRINTPROC
To print the contents of the spool file without re-opening the file afterward, at TCL enter:
PRINTPROC CLOSE
For information on the TCL PRINTPROC and SETPRINTER commands, see the chapter “TCL Command Reference” in TCL. For information on programming for PostScript printers, see “Programming for PostScript Printers” below.
Deleting Reports from The Spool File
If you want to delete all reports in the spool file, execute the following command at TCL:
PRINTPROC OPEN
This produces a message that asks if you want to overwrite the spool file. Answer “Y”, and:
- The contents of the spool file are deleted.
- The spool file is opened again and ready to receive output.
Warning! Executing the PRINTPROC OPEN command deletes all reports that you have run since opening the spool file, not just the most recent report.
Specifying a Location for the Spool File
You can choose a location on your system for the PostScript spool
1. Access the General System Configuration window (Management-Environment-General from the Main menu).
2. At the Sort DOS Path Name prompt, enter the full operating system path for the file, including the drive letter:
C:\AREV\filename
Logging Off When the Spool File Contains Data
If you attempt to log off before printing the reports in the spool file, Advanced Revelation prompts you to either print or delete the contents of the file.
Printing and Displaying R/BASIC Reports
Using the R/BASIC PRINT statement, you can print R/BASIC reports in a variety of fonts and print styles as well as display reports in a variety of colors. In particular, you can:
- Print reports using up to 16 different fonts.
- Print text using bold, italics, and a variety of other print styles.
- Print the same report on different printers, using the same fonts and print styles, without altering the R/BASIC program.
- Control color and other display attributes for reports displayed on the screen.
Changing Printer and Display Attributes
To change printer and display attributes, simply include attribute codes in the R/BASIC PRINT statements of an R/BASIC program. Then, when you run the program and send output to the printer or the screen, the system interprets the attribute codes and modifies output accordingly.
For details on how to include attribute codes in PRINT statements, see “PRINT” and the “@” (at) function in the “R/BASIC Command Reference” chapter in R/BASIC.
If you send output to the printer, the printer definition for the active printer must include printer-specific codes that correspond to the attributes in the PRINT statements. If printer-specific codes are missing from the printer definition, the related attributes in the PRINT statement are simply ignored.
For example, if you include the code for bold in a PRINT statement, the printer definition for the active printer must also include a code for bold.
For more information, see “What is a Printer Definition?” and “Creating Printer Definitions” under “Using Printers with Advanced Revelation” above.
The table below lists the currently available attribute codes and their corresponding meanings. See the PRINT_CONSTANTS record in the INCLUDE file for possible enhancements.
Whether you can use all of the attributes listed in the table depends on the capabilities of your monitor or printer. For example, if you have a monochrome monitor, color attributes will not display in color.
PRINT Command Attribute Codes
Display Attributes:
Attribute code | Meaning |
---|---|
NORMALS$ | Normal |
REVERSE$ | Reverse |
HIGHLIGHT$ | Highlight |
BLINK$ | Blink |
RBLINK$ | Reverse blink |
ULINE$ | Underline |
BULINE$ | Underline blink |
DBLUE$ | Dark blue |
LBLUE$ | Light blue |
DCYAN$ | Dark cyan |
LCYAN$ | Light cyan |
DGRN$ | Dark green |
LGRN$ | Light green |
DYEL$ | Dark yellow |
LYEL$ | Light yellow |
DRED$ | Dark red |
LRED$ | Light red |
DMAG$ | Dark magenta |
LMAG$ | Light magenta |
DGREY$ | Dark grey |
LGREY$ | Light grey |
BLACK$ | Black |
WHITES | White |
WOB$ | White on blue |
YOB$ | Yellow on blue |
WORS | White on red |
WOY$ | White on yellow |
YOR$ | Yellow on red |
BOG$ | Black on grey |
DBOG$ | Dark blue on grey |
ROG$ | Red on grey |
WOBLK$ | White on black |
GOBLK$ | Grey on black |
YOBLK$ | Yellow on black |
Print Styles:
Attribute code | Meaning |
---|---|
BOLDON$ | Bold on |
BOLDOFF$ | Bold off |
ITALON$ | Italics on |
ITALOFF$ | Italics off |
ULINEON$ | Underline on |
ULINEOFF$ | Underline off |
SUBSON$ | Subscript on |
SUBSOFF$ | Subscript off |
SUPSON$ | Superscript ob |
SUPSOFF$ | Superscript off |
ENHONS | Enhanced on |
ENHOFF$ | Enhanced off |
WIDEONS | Wide on |
WIDEOFF$ | Wide off |
Fonts:
Attribute code | Meaning |
---|---|
BEGINFONT1$ to BEGINFONT16$ | Fonts 1 to 16 on |
ENDFONT!$ to ENDFONT16$ | Fonts i to 16 off |
Printer Control Codes:
Attribute code | Meaning |
---|---|
PRNINIT$ | Printer initialization |
PRELUDE$ | Pre-defined for PostScript printers |
ENDOFJOB$ | Pre-defined for PostScript printers |
Converting Display Attributes for Printing
You may want to print a report that contains display attribute codes (for example, colors, blink) in the R/BASIC PRINT statements. These display attribute codes can be converted into printer fonts and print styles. For example, if a report heading displays in red on the screen, you can print it in bold, italics, or some special font.
Convert display attributes to fonts and print styles using the Display Attribute Translation window:
- Access the Printer Definition window (Management-Hardware- Printer-Definitions from the Main menu). Press [F2] and select a printer definition from the popup. Press [Shift-F1] to display the Display Attribute Translation window.
- Select a display attribute by pressing [F2] from any prompt in the “Display Attribute” column. When the Attribute popup appears, move the highlight to an attribute and press [Return]. The window reappears, and the cursor is positioned on the attribute that you chose from the popup.
- Press [Return] to move the cursor to the Print As prompt. At this prompt, press [F2] to display a popup of the fonts and print styles available for the current printer definition. The value that you select from this popup determines how the current display attribute appears when you send the report to the printer.
Suppose, for example, that you choose a print style of bold for the display color red. Whenever you print a report that displays in red, that report prints in bold.
The values that you enter in the Display Attribute Translation window apply only to the current printer definition. If you want to perform the same conversion for other printers on your system, you must enter values in each of the appropriate printer definitions. Remember that these values differ from one printer to another.
Converting Printer Attributes for Display
You may want to display a report that contains printer font and print style codes (for example, bold or italics) in the R/BASIC PRINT statements. The system provides a method for converting these font and print style codes into display attributes. For example, if a report heading prints in bold, you can display it in red when you send the report to the screen.
Convert fonts and print styles to display attributes using the Font Attribute Table window:
The display attributes that you enter in the Font Attribute Table window apply to all printer definitions.
- To avoid altering the default settings, create a new Font Attribute Table. See “Creating a New Font Attribute Table” below.
- Access the Font Attribute Table window (Management-Hardware- Display-Font Attribute Table from the Main menu).
- Select the Font Attribute Table that you want to modify by pressing [Shift-F1] and selecting a table from the popup.
- For each prompt in the “Begin” column, press [F2] and select a display attribute for the corresponding print style or font. The attribute that you select from this popup determines how a font or print style appears when you display the report on the screen.
Suppose, for example, that you choose red for the print style bold. Whenever you display a report that prints in bold, that report displays in red. - Some printers require both that you send a code to begin printing in a font or print style and that you send a code to stop printing in that font or print style. If your printer requires codes to stop printing in a font or print style, specify a value in the “End” column. (The typical values are “WHITE” for color monitors and “NORMAL” for monochrome monitors.)
Selecting a Font Attribute Table for the Current Environment
The Font Attribute Table for the current environment determines the appearance of R/BASIC reports that you display on the screen. If the report specifies any printer characteristics (fonts and print styles), they are converted to display attributes using the Font Attribute Table. To select a table for the current environment:
- Access the Video Display Environment window (Management-Hardware-Display-Environment from the Main menu).
- Press {F2] from the Font Attribute Table prompt. Choose a table from the popup.
- Press [F9] from the window to save your changes or [Esc] to leave the window without saving changes.
Creating a New Font Attribute Table
If you want to modify a Font Attribute Table, you should copy an existing Font Attribute Table record and change the copy. Copy an existing record at the Record Copy window:
- Access the Record Copy window (Tools-Records-Record Copy from the Main menu).
- Font Attribute Table records are stored in the DISPLAY_CONFIG file. Copy an existing record to a new record name in the same file. Remember that this is the name you see when you:
* Select a Font Attribute Table to modify.
* Select a Font Attribute Table for the current environment.
Programming for PostScript Printers
Printing on PostScript printers is a little different from printing on other printers, as described under “Using PostScript Printers” above. However, your users need not see these differences. In the R/BASIC program that creates the report, simply include the following statement after the last PRINT statement:
PERFORM PRINTPROC
This automatically executes two TCL commands:
PRINTPROC CLOSE PRINTPROC OPEN
These commands execute the close and the open processes in the printer definition for the currently active printer.
For more information on the open and close processes, see “Running Printer and Network Initialization Processes” above.
In the case of a PostScript printer, this:
- Closes the spool file.
- Prints the contents of the spool file.
- Opens the spool file for another job.
For all other printers, PERFORM PRINTPROC executes the corresponding open and close processes, if any.