Those of us upgrading older OI applications to version 9.0 will inevitably want to have some reports printed using the old OIPI print engine and others using the new OIPI.NET engine, especially where an old OIPI report is not fully compatible with OIPI.NET.
The OI help files explain how the default print engine can be defined in the CFG_OIPI record to run either the old OIPI engine or the new OIPI.NET engine released in version 9.0 – more below.
However, what happens if you want to have an old report run using OIPI and a new one to run using OIPI.NET? In addition, what if you want one user or one application to exclusively use one of the other? All of this is configurable within OpenInsight:
- Default Behaviour
The CFG_OIPI record controls the default behaviour for the entire system. Setting this record to VSPRINTER will run all OIPI reports with the old OIPI print engine as a default. Set the record to VSPRINTER2, and OpenInsight will default to use OIPI.NET.
- Setting the default print engine by application
You can configure the system to use one of the two print engines across a specific application by creating a CFG_OIPI* record in SYSENV. For example, CFG_OIPI*SYSPROG with a value of VSPRINTER2, will set all OIPI reports printed from the SYSPROG application to run using OIPI.NET. This setting will override any system wide default setting in CFG_OIPI.
- Setting the default print engine by user
A print engine to be used for a specific user can easily be configured in a similar way. In this instance, a CFG_OIPI** record will need to be created. For example, if there is a CFG_OIPI*SYSPROG*MARTYN record defined with a value of VSPRINTER, all reports that user MARTYN prints from the SYSPROG application will be printed using the old OIPI print engine. Again, the system wide default in CFG_OIPI will be overridden by this user-specific record.
- Setting the print engine for a specific OIPI report
Revelation has also catered for those of you with legacy OIPI reports that are not compatible with OIPI.NET and who also want to use OIPI.NET for printing to html or who want to use the many new features in OIPI.NET. In this situation you simply need to call SET_PRINTER2() and GET_PRINTER2() in your report’s Stored Procedure to use the OIPI.NET print engine or SET_PRINTER1() and GET_PRINTER1() to use the old OIPI engine. Once again, this method overrides the default setting in the CFG_OIPI record, leaving you the best of both worlds.
For most people upgrading older applications to version 9.0, the obvious choice is to make sure that the default engine is set to VSPRINTER in the CFG_OIPI record and then simply create your new OIPI.NET driven reports using VSPRINTER2 instead, or one of the app/user specific options. This removes the need to modify your hundreds of old tried and tested reports when upgrading to version 9.0.