OLIST / TCL / RUN_REPORT Changes for OI 10.2
The TCL window, the RUN_REPORT program and the OLIST program all use the OLIST module. OLIST implements an imperative reporting language (RLIST). Given a statement in that language, OLIST employs the OIPI or BRW print engine to generate output and display it using the VSPrinter or XBand output window
The OLIST_PRODUCE routine has been rewritten in the OI 10.2 release to improve performance and provide progress bar support, and to support output to a grid window.
The various print routines have been enhanced to include support for the PDFFILE and CSVFILE keywords, which allow you to generate PDF or CSV file output.
A new AUTOFIT keyword has been introduced to instruct OLIST to try and shrink columns and fonts so that a report fits onto the page
A new COLORTHEME keyword applies predefined sets of colors and fonts to a report (see COLORTHEME section below).
The OLIST, TCL, and RUN_REPORT tools allow you to specify colored output using FONT, COLFONT, COLSHADE, COLHDRSHADE and SHADE keywords. Colors can now be specified using the same six character hex codes as used in CSS style sheets, for example “#C7E6F4”.
TCL statement with Shading and fonts
OLIST output with shading and fonts
COLORTHEME Keyword
Emulating the Banded Report Writer’s “themes”, which are preset combinations of fonts and colors, OLIST now supports the COLORTHEME keyword so that you can specify themes in your list statements. RTI_XBAND does the best job of implementing themes.
For example:
TCL statement with formatting
Color themes are configurable. We have added new SYSENV records, one containing more than thirty themes from the Banded Report Writer (RTI_XBAND_THEMES_DEFAULT), and another which lets you create custom themes for use with your own reports.
PDFFILE, CSVFILE keywords
10.2 fixes the PDFFILE and CSVFILE keyword so that you can specify an output file in the list statement.
To execute the report and generate a PDF file, use the PDFFILE keyword, optionally specifying a filename. If you don’t specify a filename, OpenInsight will default to a guid. If you don’t specify a folder then OpenInsight will default to the user’s documents folder. OpenInsight will also append the “.PDF” extension to the filename if needed. OpenInsight will do the same with CSVFILE and the “.CSV” file extension on the filename if needed.
Below is an example of a LIST statement with formatting and the PDFFILE keyword.
Sample R/List to PDF code
PDF Output
The same command with the CSVFILE keyword will by default open in Excel (if installed on the workstation)
CSV opened in Excel
New Grid window
The (G option routes output to a form rather than an OIPI viewer. We updated the form (RTI_RLISTX_GRID) and the underlying routines for the 10.2 release.
AREV64 Support for OLIST
The 10.2 reporting enhancements are also available to AREV64 applications. AREV_OLIST is a new VOC entry to access the OI reporting tool; because this is a VOC entry, you can type it in to TCL, execute it using a catalyst code and command, or EXECUTE or PERFORM it from a Basic+ program. If there is an active select then the list will be passed to the OLIST processor.
AREV_OLIST
From TCL, a VOC script, or via PERFORM or EXECUTE statements, you can write list statements which will execute using OLIST, supporting the full OLIST syntax
Run OList from AREV64
Result of running OList from AREV64
New and Enhanced Configuration Record
The CFG_OLIST configuration record 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).
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_OLIST
The CFG_OLIST record controls the default font information for OLIST output. Field 1 is an @VM delimited string that contains the font name, font size, font justification, bold flag, italic flag, underline flag, strikethrough flag, foreground color, text angle, and text alignment.
Example OList configuration