fgl_report_configureSVGPreview

Select how the document is handled by the SVG previewer.

This function is available only for SVG output when previewing is selected.

Syntax

fgl_report_configureSVGPreview(
   preview STRING)
  1. preview - There are four possible options:
    Preview
    Makes the previewer visible and shows the document in a tab folder. This is the default value.
    ShowPrintDialog
    Pops up the print dialog, allowing the user to select and configure a printer. The document is printed in the background and the previewer main window is not shown.
    PrintOnDefaultPrinter
    Prints the report silently on the default printer. The previewer main window is not shown.
    PrintOnNamedPrinter
    Prints the report silently on a specific printer. The previewer main window is not shown. The printer is named by a call to fgl_report_setSVGPrinterName(), and the page range can be set by calling fgl_report_setSVGPageRange(). If the previewer is on Windows, then the paper source can be selected with the function fgl_report_setSVGPaperSource. Additional parameters that can be set for printing from the SVG previewer include fgl_report_setSVGCopies and fgl_report_setSVGSheetCollate.

Usage

This function is available only for SVG output when previewing is selected.
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")).

Example

This sample code prints the report silently on the named printer:
#Print 5 copies of the SVG report on myPrinter
IF fgl_report_loadCurrentSettings(reportname) THEN
    CALL fgl_report_selectDevice("SVG")
    CALL fgl_report_setSVGPrinterName("myPrinter")
    CALL fgl_report_configureSVGPreview("PrintOnNamedPrinter")
    CALL fgl_report_setSVGCopies(5)
    LET HANDLER = fgl_report_commitCurrentSettings()
ELSE
    EXIT PROGRAM
END IF

For an example of Genero code using a reporting function, see Using report output functions. This example may not use the specific function discussed in this topic, however it provides details on where you would place this (and other) report output functions.