ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Configuring the report viewer
  • Reports not created in the report editor
  • Warning message (syntax 1)
  • Configuring the different print modes
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Configures the report viewer:
  • display a message regarding the resources of current computer.
  • display or hide the ribbon tabs and buttons. For more details, see Report viewer.
    Ribbon
  • the export parameters in the mini-preview window.
The size and position of the report viewer window can be customized with iDestination.
Remarks:
  • When printing a report created through programming, all the print buttons are shown in the report viewer.
  • By default, all the buttons for printing a report created with the report editor are available. iParameterViewer can only be used to configure the buttons defined as visible in the report editor.
  • Two additional buttons may appear in the report viewer if the application allows running "Reports & Queries" (provided with WINDEV).
    Additional buttons
    These buttons are respectively used to modify the current report and to create a new report with "Reports & Queries". These buttons are displayed only:
    • If the project allows "Reports & Queries" to be run ("Advanced" tab of the project description).
    • If the report can be modified by "Reports & Queries" ("Options" tab of the report description).
Example
// No buttons in the report viewer
iParameterViewer(iButtonNone)
iDestination(iViewer)
 
iPrintReport(RPT_MyReport)
// Display the printer buttons only
iParameterViewer(iButtonPrinter)
iDestination(iViewer)
iPrintReport(RPT_MyReport)
// Display Printer, PDF and WORD buttons in the report viewer
iParameterViewer(iButtonPrinter + iButtonPdf + iButtonWord)
iDestination(iViewer)
iPrintReport(RPT_MyReport)
// Delete Email buttons on report viewer
iParameterViewer(iButtonAll - iButtonEmail - iButtonEmailPdf)
iDestination(iViewer)
iPrintReport(RPT_MyReport)
// Display the warning message every 2000 pages
iParameterViewer(iButtonAll, 2000)
// Print a report in the report viewer
iDestination(iViewer)
iPrintReport(RPT_MyReport)
// Display thumbnail pane in the report viewer
iParameterViewer(iThumbnailPane, True)
// Print a report in the report viewer
iDestination(iViewer)
iPrintReport(RPT_MyReport)
Syntax

Displaying (or not) the different options in the toolbar of the report viewer Hide the details

iParameterViewer(<Options> [, <Warning>])
<Options>: Integer constant (or combination of constants)
Buttons that will be displayed in the report viewer:
iButtonAllAll the buttons and toolbars are visible.
iButtonAnnotationThe "Annotation" button is available in the "Preview" tab. The "Annotate" tab used to write annotations in the report is visible. For more details on this tab, see "Annotate" tab.
This constant is not taken into account in the mini-preview.
iButtonBlackAndWhiteThe button used to print the document in black and white is visible.
This constant is not taken into account in the mini-preview.
iButtonDuplexThe button used to print the document on both sides is visible.
This constant is not taken into account in the mini-preview.
iButtonDuplicateThe "Export" tab is visible. The button used to save a duplicate copy of the current report is displayed in the "Export" tab. For more details on this tab, see "Export" tab.
This constant is not taken into account in the mini-preview.
iButtonEmailThe "Export" tab is visible. The button used to create an email with the content of the integrated report is displayed in the "Export" tab. For more details on this tab, see "Export" tab.
iButtonEmailPdfThe "Export" tab is visible. The button used to create an email with an attached PDF is displayed in the "Export" tab. For more details on this tab, see "Export" tab.
iButtonExcelThe "Export" tab is visible. The button used to create an Excel file from the current print is displayed in the "Export" tab. For more details on this tab, see "Export" tab.
iButtonHtmlThe button used to print the report in an HTML file is visible.
iButtonNoneOnly the "Preview" tab of the report viewer is displayed. For more details on this tab, see "Preview" tab.
iButtonPdfThe button used to print the report in a PDF file is visible.
iButtonPrinterThe two buttons used to start the print are visible.
This constant is not taken into account in the mini-preview.
iButtonReportCreationThe button used to create a report with "Reports and Queries" is visible.
iButtonReportModificationThe button used to modify the current report with "Reports and Queries" is visible.
This constant is not taken into account in the mini-preview.
iButtonSearchThe toolbar used to perform a search in the report is visible.
This constant is not taken into account in the mini-preview.
iButtonSnapshotThe button used to take a snapshot of report (or report section) is visible.
This constant is not taken into account in the mini-preview.
iButtonTextSelectionThe button used to select a text is visible.
This constant is not taken into account in the mini-preview.
iButtonWatermarkThe button used to add and configure a text in watermark is visible.
This constant is not taken into account in the mini-preview.
iButtonWordThe button used to print the report in a RTF file is visible.
iButtonXmlThe button used to print the report in an XML file is visible.
<Warning>: Optional integer
Number of pages from which a warning message is displayed. This message informs the user that the memory resources of the current computer may become insufficient if the remaining pages are displayed.
This parameter is set to 1000 by default.
The message will never be displayed if this parameter is set to 0.

Configuring the report viewer options Hide the details

iParameterViewer(<Options> , <Display>)
<Options>: Integer constant
Element to configure:
iStorePaneRibbonSaves the ribbon tab displayed in the report viewer.
By default, the last tab is not saved. Instead, the print tab is displayed when the preview is opened.
iThumbnailPaneConfigures the thumbnail pane.
<Display>: Boolean
  • True if the thumbnail pane must be displayed in the report viewer,
  • False if the thumbnail pane must not be displayed.
By default, the thumbnail pane is displayed in the report viewer.
Remarks

Configuring the report viewer

  • The configuration defined by iParameterViewer is effective until:
    • the next call to iReset,
    • the next call to iParameterViewer.
  • To configure the report viewer of all application reports, iParameterViewer must be used in the project initialization code.
  • The buttons of the report viewer can also be configured in the report editor ("UI" tab of the report description). In this case, iParameterViewer called before printing the report is used to hide the additional buttons. Buttons that are defined as invisible in the report will always remain invisible.
Remarks:
  • If the report viewer allows you to send emails, the email characteristics can be configured using iParameterExport.
  • The thumbnail pane can be shown or hidden through programming only.

Reports not created in the report editor

When printing reports created through programming (not in the report editor), all the buttons of the toolbar are visible.

Warning message (syntax 1)

The warning message appears only when a report is printed.
If the user clicks "No" to prevent the following pages from being displayed, the report viewer remains open on the pages that are already displayed. In this case, the entire document is printed or exported (and not only the pages displayed in the report viewer).

Configuring the different print modes

You have the ability to configure the options of the different print modes:
Component: wd290prn.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help