Previewing a report

The SVG report format is provided for previewing a report. A report can be previewed in a desktop application or in a browser.

Preview in a desktop app: Genero Report Viewer

To preview a report in the desktop version of Genero Report Viewer, specify "SVG" as the output device.
fgl_report_selectDevice("SVG")

Preview in a browser: Genero Report Viewer for HTML5

To preview a report in the browser, you preview using Genero Report Viewer for HTML5. Specify "browser" as the output device.
fgl_report_selectDevice("Browser")

See Send report data to a browser for additional API functions that must be called when previewing in a browser.

Preview options

When electing to preview to the Genero Report Viewer, you can configure SVG preview options:

Preview
The report is shown in a folder tab of the main preview window.
ShowPrintDialog
This option pops up the system print dialog, allowing the user to select and configure a printer. If confirmed, the document is printed in the background.
PrintOnDefaultPrinter
This option prints the report silently on the default printer. The previewer main window is not shown.
PrintOnNamedPrinter
This option prints the report silently on a specific printer. The previewer main window is not shown.
Use the API function fgl_report_configureSVGPreview. For example:
CALL fgl_report_configureSVGPreview("ShowPrintDialog")
Important: Preview options set by fgl_report_configureSVGPreview are only valid when previewing with Genero Report Viewer in a Desktop configuration (fgl_report_selectDevice("SVG")). They are not valid when previewing with Genero Report Viewer for HTML5 in a Web configuration ( (fgl_report_selectDevice("Browser")).

Additional API functions provide more SVG options: