Running a Genero ASCII report using GRW (Compatibility Report)
This type of report is referred to as a compatibility report.
If you have an existing Genero BDL program (4gl) that creates an ASCII report, you can execute the program using the Genero Report Writer without changing the existing Report Driver or the existing Report program block, and without creating a Report Design document (4rp).
DEFINE handler om.SaxDocumentHandler
IF fgl_report_loadCurrentSettings(NULL) THEN -- switch on Compatibility mode
-- (run without 4rp file)
LET handler = fgl_report_commitCurrentSettings() -- commit settings
END IF
Switching on Compatibility mode overrides the "TO ..." part of the START REPORT BDL statement.
The formatting of the report will be that specified in the REPORT program block of your BDL program. (See Auto-formatting for an alternative to the Compatibility format.) The report engine will use the default output settings, displaying a preview of the report in SVG format in the Report Viewer. Additional SVG preview options are available, using the API function fgl_report_configureSVGPreview. The API function fgl_report_configureCompatibilityOutput can optionally be used to change the default output settings.
The demo report OrderReportASCII illustrates this feature.
Auto-formatting Reports that have no 4rp (Report Design Document)
Beginning with version 2.40, auto-formatting of these reports that have no report design document (4rp) is available, as an alternative to the Compatibility format. New API calls have been added to provide generic report formatting. Currently only one design is provided, a simple list design that is compatible with the List Report template that is shipped with Genero Report Writer. This type of auto-formatting is particularly well suited to produce Excelâ„¢ output from arbitrary reports. See fgl_report_setAutoformatType and fgl_report_configureAutoformatOutput.Report Metadata in Compatibility Reports
New API functions allow you to add report metadata to Compatibility Reports. These functions are intended to be used for compatibility reports only. See Report Metadata functions. For regular reports, the metadata can be set in corresponding properties in the Properties View of the Report Designer.
Mixing Genero ASCII Reports, GRW Reports, and Compatibility Reports
Genero ASCII (text-based) reports and GRW (graphical) reports can be run from the same Genero program without requiring any additional calls.
However, running Compatibility Reports requires that Compatibility mode be switched on. Once Compatibility mode is invoked, it stays active throughout the program, running any subsequent Genero ASCII reports using the Genero Report Writer also. If your program needs to restore text-based output for a Genero ASCII report, you must call the API function fgl_report_stopGraphicalCompatibilityMode.