PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
This content comes from an automatic translation.
  • When should I use iPreview?
  • Print preview
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Warning
From version 25, the iDestination function should be preferred. This function provides printing via the report viewer (called print preview in previous versions), via the mini-preview window, and all print destinations.
Configures the preview window. You have the ability to print:
  • on the printer directly (syntax 1).
  • in a preview window (syntax 2). The user can preview the print result on the screen, page by page. This window allows you to:in a preview window (syntax 2). The user can preview the print result on the screen, page by page. This window allows you to:
    • scroll the pages (next page and previous page if they exist),
    • start the print,
    • modify the scale of preview,
    • display the first page or the last page,
    • find out the number of the current page, ...
Note about compatibility
In the earlier versions, iPreview also allowed you to choose the print destination. These syntaxes have been kept for backward compatibility but iDestination must now be preferred for this use.
Remark: A warning message is displayed by default if the current computer may not have sufficient resources to display all pages in the preview (from 1000 pages). To avoid displaying this message or to configure the number of pages before displaying this message, use iParameterPreview.
Reports and Queries
// Printing in a preview configuring the title of the preview window
IF iConfigure() = True THEN iPreview(iPage, "List of functions")
Reports and Queries
// Opening the preview:
// when starting for the first time: preview with zoom out
// in subsequent starts: keeping the values of the last preview
iPreview()
Versions 24 and later
Reports and Queries
// Open the mini preview
iPreview(iMiniPreview)
New in version 24
Reports and Queries
// Open the mini preview
iPreview(iMiniPreview)
Reports and Queries
// Open the mini preview
iPreview(iMiniPreview)
Syntax

Printing on the printer directly Hide the details

iPreview([<Destination> [, <Job name>]])
<Destination>: Optional integer constant
Print destination.
iPrinterDirect print on the printer
<Job name>: Optional character string (with quotes)
Name that will be given to the print. This name will be used to identify the print in the list of jobs processed by the printer.
Reports and Queries

Printing in a preview window Hide the details

iPreview([<Zoom> [, <Title of preview window> [, <Print buttons> [, <Horizontal position> [, <Vertical position> [, <Width> [, <Height>]]]]]]])
<Zoom>: Optional integer constant
Zoom when opening the preview window.
iPage
Versions 15 and later
ipvZoomPage
New in version 15
ipvZoomPage
ipvZoomPage
Preview with zoom out: the page will be entirely displayed in the zoom window.
iDefaultZoom
Versions 15 and later
ipvZoomDefault
New in version 15
ipvZoomDefault
ipvZoomDefault
(default value)
Corresponds to:
  • ipvZoomPage for a first use.
  • the zoom defined by the user in the preview window for the other uses.
i100
Versions 15 and later
ipvZoom100
New in version 15
ipvZoom100
ipvZoom100
Preview with a zoom set to 100%.
i2Pages
Versions 15 and later
ipvZoom2Pages
New in version 15
ipvZoom2Pages
ipvZoom2Pages
Preview displaying 2 pages at a time.
Versions 15 and later
ipvZoomPageWidth
New in version 15
ipvZoomPageWidth
ipvZoomPageWidth
Preview displaying the entire page width.
Value from 10 to 999Preview with the specified zoom.
If this parameter is not specified, the default value corresponds to:
  • ipvZoomPage during the first use of the function.
  • the zoom defined by the user in the preview window for the other uses.
<Title of preview window>: Optional character string
Title displayed in the title bar of the window. If this parameter is not specified, the default title will be "Report preview" followed by the report name.
If the user has the ability to generate some files (Word, PDF, ...) from the report viewer, the preview title will be automatically proposed as file name. If this parameter is not specified, the name of the file will correspond to the name of the report.
<Print buttons>: Optional boolean
  • True (by default) to display the buttons allowing the user to start the print,
  • False to avoid displaying the buttons.
<Horizontal position>: Optional integer
Horizontal position of preview window (in pixels). By default, the horizontal position corresponds to 100 pixels.
<Vertical position>: Optional integer
Vertical position of preview window (in pixels). By default, the vertical position corresponds to 100 pixels.
<Width>: Optional integer
Dimensions of preview window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
<Height>: Optional integer
Dimensions of preview window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
Versions 24 and later
Reports and Queries

Print in a mini-preview window Hide the details

iPreview([<Destination> [, <Title of the mini-preview window>]])
<Destination>: Integer constant
Print destination:
iMiniPreview
Displays the printout in a mini-preview window.
<Title of the mini-preview window>: Optional character string
Title displayed in the title bar of the mini-preview window.
If this parameter is not specified, the default title will be "Report preview" followed by the report name.
If the user can generate files (Word, PDF, etc.) from the print mini-preview, the title of the preview will automatically be proposed as the file name. If this parameter is not specified, the name of the file will correspond to the name of the report.
New in version 24
Reports and Queries

Print in a mini-preview window Hide the details

iPreview([<Destination> [, <Title of the mini-preview window>]])
<Destination>: Integer constant
Print destination:
iMiniPreview
Displays the printout in a mini-preview window.
<Title of the mini-preview window>: Optional character string
Title displayed in the title bar of the mini-preview window.
If this parameter is not specified, the default title will be "Report preview" followed by the report name.
If the user can generate files (Word, PDF, etc.) from the print mini-preview, the title of the preview will automatically be proposed as the file name. If this parameter is not specified, the name of the file will correspond to the name of the report.
Reports and Queries

Print in a mini-preview window Hide the details

iPreview([<Destination> [, <Title of the mini-preview window>]])
<Destination>: Integer constant
Print destination:
iMiniPreview
Displays the printout in a mini-preview window.
<Title of the mini-preview window>: Optional character string
Title displayed in the title bar of the mini-preview window.
If this parameter is not specified, the default title will be "Report preview" followed by the report name.
If the user can generate files (Word, PDF, etc.) from the print mini-preview, the title of the preview will automatically be proposed as the file name. If this parameter is not specified, the name of the file will correspond to the name of the report.
Remarks

When should I use iPreview?

iPreview must be the first print function called. It must be called before iPrint, iCreateFont, etc. However, iPreview must be called after iConfigure or iParameter.
Remark: The iDestination function must be called before executing a report (with iPrintReport) to choose the destination of the report execution.
Reports and Queries

Print preview

1. Customizing the preview window
WINDEV allows you to customize the interface of the preview window. You can:
Remark: If the print preview allows you to send an email, you can set the email characteristics using the iParameterExport function.
2. Zoom values
  • We do not recommend that you give a value less than 33% to the zoom, otherwise the buttons found in the preview window will be flatten and unreadable.
  • In zoom-out mode, depending on the requested font (for example, with some fonts that are smaller than 14), the font used by Windows to display the text is not proportional to the print font. This results in an incorrect display; however, the print will be correct.
3. Canceling the preview
When previewing a report, iPrint and iPrintWord return False if the "Abandon" button was clicked by the end user. To test the abandon of the preview, you must write:
IF iPrint(Text) = False THEN RETURN
Business / UI classification : Neutral code
Component : wd250prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Imprimindo etiquetas using PRN numa impressora Zebra
https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windev/236189-print-file-prn-label-with-windev-printer-zebra-236239/read.awp
BOLLER
15 Jan. 2020
Video iPreview iMiniPreview
https://youtu.be/_SNnhq93oEw

https://windevdesenvolvimento.blogspot.com/2019/07/dicas-2193-windev-webdev-mobile.html

// BTN_PRINT1
iPreview(iMiniPreview)
iPrintReport(RPT_relacao_CLIENTE)
amarildo
11 Jul. 2019