OIPI (Classic and .NET) Changes for OI 10.2
New look for display windows
New Preview windows have been created for both OIPI Classic and OIPI.Net. These windows are created using the OpenInsight 10.2 Form Designer and combine the best features of the original preview windows.
OIPI Classic PDF Generation
To support generating PDF output from OIPI Classic, OI 10.2 automatically installs a separate Windows PDF printer (named OIPI_PDF Printer) during the client install process. Generating a PDF from OIPI Classic will automatically use this printer. You can also select the printer in OIPI or in Arev64. This provides a way to easily generate PDF files from list statements. Please see the section on “OIPI Classic PDF Generation” at the end of this document for additional details.
INIT Method Enhancements
The SET_PRINTER “INIT” method now allows you to specify a single filename to use when exporting output. This suppresses the dialog asking the user where, and what type, of export file is desired; when the export button is pressed, the file is generated without user interaction. Specify the desired filename (including the full path and appropriate extension) in INIT parameter 1, field 6, value 1. If you wish to allow any “additional details” user interface to appear, then set INIT parameter 1, field 6, value 2, to “1”; to suppress the UI entirely, set the value to “0”.
When generating PDF or other advanced file type output, there are a number of output-type-specific display attributes that can be set - for PDFs, for example, you can set security attributes, such as an owner’s password, user password, and file privileges. These extra display attributes can be passed in INIT parameter 1, field 5. For PDF output, value 1 can be set to the owner password; value 2 can be set to the user password; value 3 can be a combination of the letters “C” (allow copy), “E” (allow editing), “P” (allow printing), and “A” (allow annotation) to restrict usage as desired; and value 4 can be set to “1” if you want the PDF file displayed after generation. For other output types, such as JPG, HTML, DOCX, etc., only value 4 (display after creation) is relevant.
New and Enhanced Configuration Records
The OIPI configuration record (CFG_OIPI) has been enhanced, and can be placed in the SYSENV table. It can be defined globally, or per-application (by appending “*<appid>” to the configuration name), or per-user (by appending “**<userid>” to the configuration name), or per-application/per-user (by appending “*<appid>*<userid>” to the configuration name). Similarly, the new CFG_AREV64_OIPI record can be defined on a global, per-app, per-user, or per-applicaton/per-user basis.
You can use the OIConsole to enter the details into this configuration record, or you can update it manually via the Record Editor.
OIConsole configuration editor
CFG_OIPI
The CFG_OIPI record has been enhanced with additional functionality. As before, field 1 contains either VSPRINTER1 for OIPI Classic, or VSPRINTER2 for OIPI.Net, to set the desired printing engine. However, in OI 10.2, the default value (if none is specified) has changed to VSPRINTER1.
Field 2 is a flag to indicate whether the CFG_OIPI record should be cached for increased performance (default is 1).
Field 3 is an optional “PDF Printer” to use for PDF generation in OIPI Classic – note that this is no longer required, as OI 10.2 includes its own PDF Printer and will use OIPI_PDF Printer by default, but this can be overridden if desired by putting the overriding printer name in this field. If field 3 is specified, you may also specify the output location (full path and file name) that the PDF Printer will output to in field 4.
Field 5 allows you to specify the default TERM behavior – normally, the TERM command only hides the OIPI form, but specifying “1” in field 5 forces the set_printer TERM statement to become TERM,1 which explicitly closes the form.
If field 6 is set to 1, then the OIPI form will have its own icon on the taskbar when the form is open.
If field 7 is set to 1, then the OIPI form is always “on top” of other forms.
If field 8 is set to 1, then any OLIST statements will automatically be run as XBAND statements, without needing to have the “(X” option at the end. Field 9 can contain the name of the default theme to use for OLIST XBAND output.
Field 9 contains the name of the default XBand theme to use for TCL R/List output.
CFG_AREV64_OIPI
The CFG_AREV64_OIPI record has been created. Revelation Software has traditionally provided two default OIPI printers in AREV64, one designed for landscape printing and one designed for portrait. The CFG_AREV64_OIPI record allows you to specify “automatic rotation” between Landscape and Portrait.
If field 1 is set to “1”, then landscape or portrait mode for the currently selected OIPI printer will be determined by the @LPTRWIDE variable’s value when printing. If field 1 is set to “0” (the default), then you must explicitly select either a landscape or portrait printer.
Landscape or portrait orientation may also be set explicitly via the SET_OIPI_PROPERTIES call; if field 2 of the configuration record is “1”, then the dynamic orientation value in field 1 will override the SET_OIPI_PROPERTIES call. If field 2 of the configuration record is “0” (the default), then the SET_OIPI_PROPERTIES orientation value will not be overridden.
OIPI Classic PDF Generation
OIPI Classic, in addition to having a refreshed user interface, now also includes multiple options for PDF generation: a built-in PDF printer to support PDF exports with additional features, the ability to specify your own PDF printer, and support for OI9-era PDF creation.
The ability to call your own PDF printer was previously implemented; you can specify the printer name to use in the CFG_OIPI record field 3, and the location where the PDF should be generated to in field 4.
The Revelation-provided PDF printer (named “OIPI_PDF Printer”) will be installed on each workstation when the clientsetup.exe is run. If you wish to use this built-in printer for OIPI Classic PDF generation, and you have previously set fields 3 and 4 of your CFG_OIPI to use a specific PDF printer name, please delete the information in fields 3 and 4 of your CFG_OIPI record, save the record, and exit and re-enter OI for the change to take effect.
To use the OI9-era PDF creation tool, you may specify RTIVSPDF in field 3 of the CFG_OIPI record (leave field 4 blank).
When “Export” to PDF is selected in the new OIPI Classic form, users of the new built-in PDF printer will see this new dialog:
Users who have elected to use RTIVSPDF PDF creation will instead see this dialog:
OIPI Classic will use the selected PDF output tool to generate the PDF with the available selected properties. If a large PDF is being generated, users may see a “Please Wait” message:
After more than 30 seconds, users will be given the option to continue waiting, or to cancel PDF generation:
Troubleshooting
If user permissions do not allow clientsetup.exe to properly install the registry settings for the new built-in printer, the “old” PDF dialog may be displayed instead:
If this is the dialog that appears, and you have verified that the CFG_OIPI record does NOT contain custom settings on field 3 and 4 or RTIVSPDF in field 3, then you may need to manually configure the user registry for this workstation. This can be done by starting up OpenInsight in ‘developer’ mode, and typing in the following in the System Monitor:
RTI_VSPRINTER_CLASSIC_PDF "","CLEANUP"
(do NOT copy and paste the instruction from this document; the quote characters will not be recognized properly)
This command will create the proper registry settings for the currently-logged in user, even if that user has non-administrative privileges.
If “Export” to PDF has been selected, but PDF output is still not being generated, it may also be necessary to manually disable the Windows setting that automatically determines the default printer. Again, this problem may specifically arise when a user is running with non-administrative privileges on a Windows 11 workstation.
From the Windows desktop, type in “Printer” to Windows Search, and select “Printers and Scanners”; scroll down to “Printer Preferences”:
Toggle the “Let Windows manage my default printer” setting so that it is off: