ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Configuring the print preview
  • 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
Warning
From version 25, the print preview has been renamed to "Report viewer". It is now recommended to use iParameterViewer.
Configures the print preview:
  • display a message regarding the resources of current computer.
  • display or hide the ribbon tabs and buttons. For more details, see Print preview.
  • the export parameters in the mini-preview window.
Remarks:
  • When printing a programmed report, all the print buttons are available in the print preview.
  • By default, all the buttons for printing a report created with the report editor are available. iParameterPreview can only be used to configure the buttons defined as visible in the report editor.
  • Two additional buttons may appear in the print preview if the application allows "Reports & Queries" (provided with WINDEV) to be run.
    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 and Queries" to be run ("Advanced" tab of the project description).
    • If the report can be modified by "Reports & Queries" ("Details" tab of the report description).
Example
// No button in the print preview
iParameterPreview(iButtonNone)
iPreview()
iPrintReport(RPT_MyReport)
// Display the printer buttons only
iParameterPreview(iButtonPrinter)
iPreview()
iPrintReport(RPT_MyReport)
// Display the Printer, PDF and WORD buttons in the print preview
iParameterPreview(iButtonPrinter + iButtonPdf + iButtonWord)
iPreview()
iPrintReport(RPT_MyReport)
// Delete the Email buttons from the print preview
iParameterPreview(iButtonAll - iButtonEmail - iButtonEmailPdf)
iPreview()
iPrintReport(RPT_MyReport)
// Display the warning message every 2000 pages
iParameterPreview(iButtonAll, 2000)
// Print a report from the print preview
iPrintReport(RPT_MyReport)
// Display the thumbnail pane in the print preview
iParameterPreview(iThumbnailPane, True)
// Print a report from the print preview
iPrintReport(RPT_MyReport)
Syntax

Displaying (or not) the different options in the toolbar of print preview Hide the details

iParameterPreview(<Options> [, <Warning>])
<Options>: Integer constant (or combination of constants)
Buttons that will be displayed in the print preview:
iButtonAllAll the buttons and toolbars are visible.
iButtonAnnotation
  • Until version 19: The toolbar used to write annotations in the report is visible.
  • From version 20: The "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.
iButtonDuplicate
  • Until version 19: The button used to save a duplicate copy of current report is visible.
  • From version 20: The "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 .
This constant is not taken into account in the mini-preview.
iButtonEmail
  • Until version 19: The button used to print the report in a new email is visible.
  • From version 20: The "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.
iButtonEmailPdf
  • Until version 19: The button used to print the report in a file linked to a new email is visible.
  • From version 20: The "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.
iButtonExcel
  • Until version 19: The button used to print the report in an Excel file is visible.
  • From version 20: The "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.
iButtonNone
  • Until version 19: No button or toolbar is displayed.
  • From version 20: Only the "Preview" pane of print preview 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.
iButtonReportCreation
  • Until version 19: The 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.

Configure the print preview options Hide the details

iParameterPreview(<Options> , <Display>)
<Options>: Integer constant
Element to configure:
iStorePaneRibbonAllows you to store the ribbon pane displayed by the print preview.
By default, the last tab is not saved. Instead, the print tab is displayed when the preview is opened.
iThumbnailPaneConfigure the display of panes for displaying thumbnails.
<Display>: Boolean
  • True if the thumbnail pane must be displayed in the print preview,
  • False if the thumbnail pane must not be displayed.
By default, the thumbnail pane is displayed in the print preview.
Remarks

Configuring the print preview

  • The configuration defined by iParameterPreview is effective until:
    • the next call to iReset
    • the next call to iParameterPreview.
  • To configure the print preview of all application reports, iParameterPreview must be used in the project initialization code.
  • The buttons in the preview can also be configured in the report editor ("UI" tab of the report description). In this case, iParameterPreview 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 print preview allows you to send an email, the email characteristics can be configured by iParameterExport.
  • The thumbnail pane can be shown or hidden through programming only.

Reports not created in the report editor

When printing programmed reports (not created in the report editor), all the buttons found in the button bar are visible.

Warning message (syntax 1)

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

Configuring the different print modes

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

Last update: 06/21/2023

Send a report | Local help