PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • When to use iDestination?
  • Android: Printing in PDF format
  • Printing in PDF format
  • Printing in HTML
  • Printing in XLS
  • Printing in RTF
  • Configuring the printer for printing in HTML, RTF and text format
  • Printing in PRN format
  • Printing in XML
  • Print characteristics
  • Printing on a fax
  • Printing a fax in landscape mode
  • Using a fax server installed on a computer other than the current computer
  • End of print
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 and returns the print destination.
You can print:
  • directly on the printer (syntax 1 and syntax 2).
    WEBDEV - Server code On the application server (in deployment), the print can only be done on the printers connected to the server. This feature is mainly used for the Internet sites. For the Internet sites, the print should be done in the format of a file in generic PDF format (iGenericPDF constant).
  • Versions 24 and later
    WINDEV in a mini-preview window (syntax 1).
    New in version 24
    WINDEV in a mini-preview window (syntax 1).
    WINDEV in a mini-preview window (syntax 1).
  • directly in a file in text, HTM, RTF, PDF, PRN or XML format (syntax 3).
    WEBDEV - Server code To obtain the same results during the development and on the deployed site, it is recommended to perform generic prints (with the iGenericPDF constant, for example).
    Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetMac Catalyst In this version, the print can be performed in a PDF file only.
  • Versions 15 and later
    directly a duplicate (syntax 4).
    New in version 15
    directly a duplicate (syntax 4).
    directly a duplicate (syntax 4).
  • directly on a fax (syntax 5 and syntax 6 sending a report to a fax number, for example). See Sending faxes for more details.
  • Versions 25 and later
    WINDEV in the report viewer (syntax 7). The user can preview the print result on the screen, page by page. In this viewer, you can:
    • 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, ...
    New in version 25
    WINDEV in the report viewer (syntax 7). The user can preview the print result on the screen, page by page. In this viewer, you can:
    • 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, ...
    WINDEV in the report viewer (syntax 7). The user can preview the print result on the screen, page by page. In this viewer, you can:
    • 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, ...
Versions 18 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 19 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Java This function is now available for Java applications.
New in version 19
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Java This function is now available for Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Java This function is now available for Java applications.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst Only the prints in PDF format are available.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVReports and Queries Remark: iDestination can also be used to find out the type of print performed (in the opening code of report or in the "Before re-printing" code of report). See syntax 8 for more details.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVReports and Queries Remark: iDestination can also be used to find out the type of print performed (in the opening code of report or in the "Before re-printing" code of report). See syntax 8 for more details.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVReports and Queries Remark: iDestination can also be used to find out the type of print performed (in the opening code of report or in the "Before re-printing" code of report). See syntax 8 for more details.
Example
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax
// Impression au format HTML
iDestination(iHTML, "C:\Mes documents\MonEtat.HTM")
// "C:\Mes documents\MonEtat.HTM" correspond au nom et
// au chemin du fichier HTM qui sera créé avec l'état "ETAT_MonEtatRécap"
iPrintReport(ETAT_MonEtatRécap)
WINDEVWEBDEV - Server codeReports and QueriesWindowsLinuxUser code (UMC)Ajax
// Impression au format PDF
NomFichier is string = CompleteDir(fDataDir()) + "f" + Facture + Client + ".PDF"
iDestination(iGenericPDF, NomFichier)
iPrintReport(ETAT_Facture, Client, Facture)
// Teste si on est sur un site WEBDEV
IF InWebMode() = True THEN
// Impression effectuée depuis un site WEBDEV
// Envoi du fichier à l'internaute
FileDisplay(NomFichier, "application/pdf")
Multitask(0)
// Suppression du fichier sur le serveur
fDelete(NomFichier)
END
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax
// Imprimante PCL à utiliser
iDestination(iPCL, "\\MonRéseau\MonImprimante")
// Impression au format PCL: iDestination(iPCL, "\Mes documents\MonFichier.PCL")
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax
// Génération d'un fichier PRN
iDestination(iPrinterFile, "C:\Temp\Monimpression.prn")
Versions 23 and later
WINDEVReports and QueriesWindowsUser code (UMC)
// Génération d'un fichier PDF et ouverture du logiciel de messagerie par défaut
iDestination(iPDFMail, "MaPieceJointe.PDF")
 
// Configuration du logiciel de mail (optionnel)
iParameterExport(iExportEmailRecipient, "Wam@CrazyMail.com; Celia.Wat@ZMail.fr")
iParameterExport(iExportEmailSender, "Cemoy@Berrymail.com")
iParameterExport(iExportEmailSubject, "Résultat des ventes de l'année")
iPrintReport(ETAT_MonEtat)
New in version 23
WINDEVReports and QueriesWindowsUser code (UMC)
// Génération d'un fichier PDF et ouverture du logiciel de messagerie par défaut
iDestination(iPDFMail, "MaPieceJointe.PDF")
 
// Configuration du logiciel de mail (optionnel)
iParameterExport(iExportEmailRecipient, "Wam@CrazyMail.com; Celia.Wat@ZMail.fr")
iParameterExport(iExportEmailSender, "Cemoy@Berrymail.com")
iParameterExport(iExportEmailSubject, "Résultat des ventes de l'année")
iPrintReport(ETAT_MonEtat)
WINDEVReports and QueriesWindowsUser code (UMC)
// Génération d'un fichier PDF et ouverture du logiciel de messagerie par défaut
iDestination(iPDFMail, "MaPieceJointe.PDF")
 
// Configuration du logiciel de mail (optionnel)
iParameterExport(iExportEmailRecipient, "Wam@CrazyMail.com; Celia.Wat@ZMail.fr")
iParameterExport(iExportEmailSender, "Cemoy@Berrymail.com")
iParameterExport(iExportEmailSubject, "Résultat des ventes de l'année")
iPrintReport(ETAT_MonEtat)
Syntax
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)Ajax

Printing directly to the printer or in a mini-preview Hide the details

iDestination([<Destination> [, <Name of the document>]])
<Destination>: Optional integer constant
Print destination.
iPrinterDirect print on the printer.
WEBDEV - Server code To directly print on a printer connected to the server, a specific configuration is required. See Configuring the server to perform a print for more details.
Versions 24 and later
iMiniPreview
New in version 24
iMiniPreview
iMiniPreview
Printing in a mini-preview. This mini-preview allows you to display the pages to print and to define the printing options. Exports are also possible.
WEBDEV - Server codeJava This constant is not available.
<Name of the document>: Optional character string (with quotes)
  • For direct printing (iPrinter constant), it corresponds to the name to be given to the printout. This name will identify the printout in the list of documents processed by the printer.
  • Versions 24 and later
    For printing in a mini-preview (iMiniPreview constant), it corresponds to the title 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
    For printing in a mini-preview (iMiniPreview constant), it corresponds to the title 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.
    For printing in a mini-preview (iMiniPreview constant), it corresponds to the title 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.
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)

Printing on a PCL printer directly Hide the details

iDestination(<iPCL> , <Printer to use>)
<iPCL>: Constant
iPCL: Constant used to print on a PCL printer directly.
Caution: you cannot print in landscape mode on a PCL printer.
<Printer to use>: Character string (with quotes)
Path and name of PCL printer used. This printer must be accessible.
If this printer is accessible via Bluetooth, this parameter must correspond to "<Name of virtual outgoing port of Bluetooth>:".
If several printers are using the Bluetooth technology, a window allowing the user to choose a printer will be displayed during the print.
If this printer is accessible via Wi-Fi or network, this parameter must correspond to the name and UNC path of printer.

Printing in a file (HTM, PCL, PDF, PRN, RTF, XLS, XML, ...) Hide the details

iDestination([<Type of destination file> [, <Name of file to create>]])
<Type of destination file>: Optional integer constant
Used to configure the type of file to create:
Versions 23 and later
iEmailPDF
New in version 23
iEmailPDF
iEmailPDF
Direct print in a PDF file and open the messaging software on the current computer.
This PDF file is directly attached to a new email created by using the MAPI client installed by a messaging software of the current computer. The MAPI client and the application must be installed in the same compilation mode (32/64 bits).
The file will be named <Report name>.PDF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory. If <Name of file to create> is specified, the file name will be <Name of file to create>.PDF.
Remark: You can configure the elements of the email with iParameterExport.
WEBDEV - Server codeLinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iFileDirect print in a text file. The file will be named <Report name>.TXT (where <Report name> corresponds to the name of report defined in the report editor). This file is created in the application directory. If <Name of file to create> is specified, the file name will be <Name of file to create>.TXT.
Caution: the printer settings are very important. See remarks.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericFileDirect print in a text file. The file will be named <Report name>.TXT (where <Report name> corresponds to the name of report defined in the report editor). This file is created in the application directory. If <Name of file to create> is specified, the file name will be <Name of file to create>.TXT.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iPrinterFileDirect print in a PRN file (<Name of file to create> file). <Name of file to create> must contain the full name of PRN file.
Caution: the printer settings are very important. See remarks.
WEBDEV - Server codeLinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iHTMLDirect print in an HTML file while using a style sheet. The file will be named <Report name>.HTM (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
This print mode must be used to support the layers in the HTML pages.
If <Name of file to create> is specified, the file name will be <Name of file to create>.HTM. No preview will be displayed.
Caution: the printer settings are very important. See remarks.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericHTMLDirect print in an HTML file while using a style sheet. The file will be named <Report name>.HTM (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
This print mode must be used to manage the layers in the HTML pages.
If <Name of file to create> is specified, the file name will be <Name of file to create>.HTM. No preview will be displayed.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iHTMLWithoutCSSDirect print in an HTML file without using a style sheet. The file will be named <Report name>.HTM (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
This print mode does not support layers in the HTML pages.
If <Name of file to create> is specified, the file name will be <Name of file to create>.HTM. No preview will be displayed.
Caution: the printer settings are very important. See remarks.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericHTMLWithoutCSSDirect print in an HTML file without using a style sheet. The file will be named <Report name>.HTM (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
This print mode does not support layers in the HTML pages.
If <Name of file to create> is specified, the file name will be <Name of file to create>.HTM. No preview will be displayed.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iPCLDirect print in a PCL file (<Report name>.PCL file created in the application directory).
If <Name of file to create> is specified, the file name will be <Name of file to create>.PCL.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iPDFDirect print in a PDF file. The file will be named <Report name>.PDF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.PDF.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
AndroidAndroid Widget Java This constant is not available.
iGenericPDFDirect print in a PDF file. The file will be named <Report name>.PDF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.PDF.
Caution: The maximum format is the A4 format.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
Android The PDF prints support the standard Adobe fonts only (no Unicode format): Courier, Helvetica, Times, Symbol and ZapFDingbats. If specific fonts have been integrated into the project ("Advanced" tab of the description project window, "Project fonts" button), these fonts can be used (check that the font is redistributable). See Developing applications for Android for more details.
iRTFDirect print in a RTF file. The file will be named <Report name>.RTF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.RTF. No preview will be displayed.
Caution: the printer settings are very important. See remarks.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericRTFDirect print in a RTF file. The file will be named <Report name>.RTF (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.RTF. No preview will be displayed.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iXLSDirect print in an XLS file. The file will be named <Report name>.XLS (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.XLS. No preview will be displayed.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericXLSDirect print in an XLS file. The file will be named <Report name>.XLS (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.XLS. No preview will be displayed.
This print mode does not use the current printer driver so that an identical result is guaranteed from a computer to another one.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iXMLDirect print in an XML file. The file will be named <Report name>.XML (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.XML. No preview will be displayed.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
iGenericXMLDirect print in an XML file. The file will be named <Report name>.XML (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.
If <Name of file to create> is specified, the file name will be <Name of file to create>.XML. No preview will be displayed.
This print mode does not use the current print driver so that an identical result is guaranteed from one computer to another.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
LinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystJava This constant is not available.
<Name of file to create>: Optional character string
Name of generated file. If this parameter is not specified, the name of generated file corresponds to "Report Name". When printing in PRN format (with the iPrinterFile constant), the full name of file to create must be specified.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)

Printing a duplicate copy Hide the details

iDestination(<Destination type> [, <Name of file to create> [, <Certificate> [, <Password>]]])
<Destination type>: Integer constant
Used to configure the type of file to create:
Versions 15 and later
iDuplicate
New in version 15
iDuplicate
iDuplicate
Direct print in a duplicate file. The file will be named <Report name>.DPL (where <Report name> corresponds to the report name defined in the report editor). This file is created in the application directory.

Caution: This constant can only be used to print a duplicate copy and not to start a print.
To create a duplicate copy of a print, we recommend that you use iParameterDuplicate then iDestination to print on the printer.
WEBDEV - Server code If the file directory is not specified, the file is generated in the data directory of the site. This directory can be configured by WDCOMPTE. This directory is returned by fDataDir. We recommend that you use iLastFile to open the last generated file.
<Name of file to create>: Optional character string
Name of duplicate file to create (without extension). The created file will be <Name of file to create>.DPL.
If this parameter corresponds to an empty string (""), the name of generated file will correspond to "Report Name".DPL.
<Certificate>: Certificate variable
Versions 16 and later
Name of the variable of type Certificate containing the Certificate to be used to sign the duplicate.
New in version 16
Name of the variable of type Certificate containing the Certificate to be used to sign the duplicate.
Name of the variable of type Certificate containing the Certificate to be used to sign the duplicate.
<Password>: Character string (with quotes)
Versions 16 and later
Password of generated duplicate.
New in version 16
Password of generated duplicate.
Password of generated duplicate.
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)Ajax

Printing on a fax directly without managing a status report (Windows 2000 and XP) Hide the details

iDestination(<iFax> , <Fax number to dial>)
<iFax>: Constant
iFax: Constant used to print on a fax directly.
<Fax number to dial>: Character string
Phone number corresponding to the fax where the print must be sent.
Caution: A modem must be installed on the current computer. The fax number must correspond to the features specified when configuring the modem.
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)Ajax

Printing on a fax directly while managing a status report (Windows 2000 and XP) Hide the details

<Result> = iDestination(<iFax> , <Fax number to dial> , <Fax name> [, <Name or identifier of fax server>])
<Result>: Integer
  • Identifier of the connection to the fax server,
  • 0 if an error occurs. The corresponding error message is returned by ErrorInfo.
<iFax>: Constant
iFax: Constant used to print on a fax directly.
<Fax number to dial>: Character string
Phone number corresponding to the fax where the print must be sent.
Caution: a modem must be installed on the current computer. The fax number must correspond to the features specified when configuring the modem.
<Fax name>: Character string
Name used to identify the outgoing fax. The status of outgoing fax is returned by FaxStatus.
<Name or identifier of fax server>: Optional character string or integer
Share name of fax server.
If this parameter is not specified or if it corresponds to an empty string, the fax server corresponds to the default fax server.
Caution: the fax server must be started and configured in outgoing mode. See Sending faxes for more details.
Identifier of fax server: If FaxConnect was used before iPreview, this parameter may correspond to the identifier of the fax server connection returned by FaxConnect.
Versions 25 and later
WINDEVReports and QueriesUser code (UMC)

Printing in the report viewer Hide the details

iDestination(<Destination> [, <Zoom> [, <Report viewer title> [, <Print buttons> [, <Horizontal position> [, <Vertical position> [, <Width> [, <Height>]]]]]]])
<Destination>: Integer constant
Display in the report viewer:
iViewerPrint in the report viewer.
<Zoom>: Optional integer constant
Zoom when the report viewer is opened.
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 when first used.
  • the last zoom set by the user in the report viewer, for subsequent 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 when the function is first used.
  • the zoom set by the user in the report viewer, for subsequent uses.
<Report viewer title>: 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 the report viewer window (in pixels). By default, the horizontal position corresponds to 100 pixels.
<Vertical position>: Optional integer
Vertical position of the report viewer window (in pixels). By default, the vertical position corresponds to 100 pixels.
<Width>: Optional integer
Dimensions of the report viewer window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
<Height>: Optional integer
Dimensions of the report viewer window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
New in version 25
WINDEVReports and QueriesUser code (UMC)

Printing in the report viewer Hide the details

iDestination(<Destination> [, <Zoom> [, <Report viewer title> [, <Print buttons> [, <Horizontal position> [, <Vertical position> [, <Width> [, <Height>]]]]]]])
<Destination>: Integer constant
Display in the report viewer:
iViewerPrint in the report viewer.
<Zoom>: Optional integer constant
Zoom when the report viewer is opened.
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 when first used.
  • the last zoom set by the user in the report viewer, for subsequent 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 when the function is first used.
  • the zoom set by the user in the report viewer, for subsequent uses.
<Report viewer title>: 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 the report viewer window (in pixels). By default, the horizontal position corresponds to 100 pixels.
<Vertical position>: Optional integer
Vertical position of the report viewer window (in pixels). By default, the vertical position corresponds to 100 pixels.
<Width>: Optional integer
Dimensions of the report viewer window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
<Height>: Optional integer
Dimensions of the report viewer window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
WINDEVReports and QueriesUser code (UMC)

Printing in the report viewer Hide the details

iDestination(<Destination> [, <Zoom> [, <Report viewer title> [, <Print buttons> [, <Horizontal position> [, <Vertical position> [, <Width> [, <Height>]]]]]]])
<Destination>: Integer constant
Display in the report viewer:
iViewerPrint in the report viewer.
<Zoom>: Optional integer constant
Zoom when the report viewer is opened.
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 when first used.
  • the last zoom set by the user in the report viewer, for subsequent 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 when the function is first used.
  • the zoom set by the user in the report viewer, for subsequent uses.
<Report viewer title>: 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 the report viewer window (in pixels). By default, the horizontal position corresponds to 100 pixels.
<Vertical position>: Optional integer
Vertical position of the report viewer window (in pixels). By default, the vertical position corresponds to 100 pixels.
<Width>: Optional integer
Dimensions of the report viewer window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
<Height>: Optional integer
Dimensions of the report viewer window (in pixels). By default, the dimensions of this window are set to 640 (width) by 480 (height).
Versions 21 and later
WINDEVReports and Queries

Finding out the destination of current print Hide the details

<Result> = iDestination()
<Result>: Optional integer constant
Type of print performed:
iDuplicateDirect print in a duplicate file.
Use in the event "Before re-printing": This constant is returned if the "Duplicate" button is used in the report viewer.
Versions 21 and later
iEmail
New in version 21
iEmail
iEmail
Direct print in an email.
Use in the event "Before re-printing": This constant is returned if the "Email with included content" button is used in the report viewer.
Versions 21 and later
iEmailPDF
New in version 21
iEmailPDF
iEmailPDF
Direct print in a PDF attached to an email.
Use in the event "Before re-printing": This constant is returned if the "Email with attached PDF" button is used in the report viewer.
iFileDirect print in a text file.
iGenericFileDirect print in a text file.
iPrinterFileDirectly prints into a PRN file (<Name of file to create> file).
iHTMLDirect print in an HTML file while using a style sheet.
Use in the event "Before re-printing": This constant is returned if the "HTML" button is used in the report viewer.
iGenericHTMLDirect print in an HTML file while using a style sheet.
iHTMLWithoutCSSDirect print in an HTML file without using a style sheet.
iGenericHTMLWithoutCSSDirect print in an HTML file without using a style sheet.
iPrinterDirect print on the printer.
Use in the event "Before re-printing": This constant is returned if the "Print" button is used in the report viewer.
iPCLDirect print in a PCL file.
iPDFDirect print in a PDF file.
Use in the event "Before re-printing": This constant is returned if the "PDF" button is used in the report viewer.
iGenericPDFDirect print in a PDF file.
iRTFDirect print in an RTF file.
Use in the event "Before re-printing": This constant is returned if the "Word" button is used in the report viewer.
iGenericRTFDirect print in an RTF file.
iXLSDirect print in an XLS file.
Use in the event "Before re-printing": This constant is returned if the "XLS" button is used in the report viewer.
iGenericXLSDirect print in an XLS file.
iXMLDirect print in an XML file.
Use in the event "Before re-printing": This constant is returned if the "XML" button is used in the report viewer.
iGenericXMLDirect print in an XML file.
New in version 21
WINDEVReports and Queries

Finding out the destination of current print Hide the details

<Result> = iDestination()
<Result>: Optional integer constant
Type of print performed:
iDuplicateDirect print in a duplicate file.
Use in the event "Before re-printing": This constant is returned if the "Duplicate" button is used in the report viewer.
Versions 21 and later
iEmail
New in version 21
iEmail
iEmail
Direct print in an email.
Use in the event "Before re-printing": This constant is returned if the "Email with included content" button is used in the report viewer.
Versions 21 and later
iEmailPDF
New in version 21
iEmailPDF
iEmailPDF
Direct print in a PDF attached to an email.
Use in the event "Before re-printing": This constant is returned if the "Email with attached PDF" button is used in the report viewer.
iFileDirect print in a text file.
iGenericFileDirect print in a text file.
iPrinterFileDirectly prints into a PRN file (<Name of file to create> file).
iHTMLDirect print in an HTML file while using a style sheet.
Use in the event "Before re-printing": This constant is returned if the "HTML" button is used in the report viewer.
iGenericHTMLDirect print in an HTML file while using a style sheet.
iHTMLWithoutCSSDirect print in an HTML file without using a style sheet.
iGenericHTMLWithoutCSSDirect print in an HTML file without using a style sheet.
iPrinterDirect print on the printer.
Use in the event "Before re-printing": This constant is returned if the "Print" button is used in the report viewer.
iPCLDirect print in a PCL file.
iPDFDirect print in a PDF file.
Use in the event "Before re-printing": This constant is returned if the "PDF" button is used in the report viewer.
iGenericPDFDirect print in a PDF file.
iRTFDirect print in an RTF file.
Use in the event "Before re-printing": This constant is returned if the "Word" button is used in the report viewer.
iGenericRTFDirect print in an RTF file.
iXLSDirect print in an XLS file.
Use in the event "Before re-printing": This constant is returned if the "XLS" button is used in the report viewer.
iGenericXLSDirect print in an XLS file.
iXMLDirect print in an XML file.
Use in the event "Before re-printing": This constant is returned if the "XML" button is used in the report viewer.
iGenericXMLDirect print in an XML file.
WINDEVReports and Queries

Finding out the destination of current print Hide the details

<Result> = iDestination()
<Result>: Optional integer constant
Type of print performed:
iDuplicateDirect print in a duplicate file.
Use in the event "Before re-printing": This constant is returned if the "Duplicate" button is used in the report viewer.
Versions 21 and later
iEmail
New in version 21
iEmail
iEmail
Direct print in an email.
Use in the event "Before re-printing": This constant is returned if the "Email with included content" button is used in the report viewer.
Versions 21 and later
iEmailPDF
New in version 21
iEmailPDF
iEmailPDF
Direct print in a PDF attached to an email.
Use in the event "Before re-printing": This constant is returned if the "Email with attached PDF" button is used in the report viewer.
iFileDirect print in a text file.
iGenericFileDirect print in a text file.
iPrinterFileDirectly prints into a PRN file (<Name of file to create> file).
iHTMLDirect print in an HTML file while using a style sheet.
Use in the event "Before re-printing": This constant is returned if the "HTML" button is used in the report viewer.
iGenericHTMLDirect print in an HTML file while using a style sheet.
iHTMLWithoutCSSDirect print in an HTML file without using a style sheet.
iGenericHTMLWithoutCSSDirect print in an HTML file without using a style sheet.
iPrinterDirect print on the printer.
Use in the event "Before re-printing": This constant is returned if the "Print" button is used in the report viewer.
iPCLDirect print in a PCL file.
iPDFDirect print in a PDF file.
Use in the event "Before re-printing": This constant is returned if the "PDF" button is used in the report viewer.
iGenericPDFDirect print in a PDF file.
iRTFDirect print in an RTF file.
Use in the event "Before re-printing": This constant is returned if the "Word" button is used in the report viewer.
iGenericRTFDirect print in an RTF file.
iXLSDirect print in an XLS file.
Use in the event "Before re-printing": This constant is returned if the "XLS" button is used in the report viewer.
iGenericXLSDirect print in an XLS file.
iXMLDirect print in an XML file.
Use in the event "Before re-printing": This constant is returned if the "XML" button is used in the report viewer.
iGenericXMLDirect print in an XML file.
Remarks

When to use iDestination?

iDestination must be the first print function called. It must be called before iPrint, iCreateFont, etc. However, iDestination must be called after iConfigure or iParameter.
Remark: iDestination can be called before printing a report (with iPrintReport) to choose the print destination.
AndroidAndroid Widget

Android: Printing in PDF format

By default, if iDestination is not called before starting a print in PDF format, a "document.pdf" file will be generated in the directory of application files.
If the PDF document generated by the print functions must be opened by an external application (with ShellExecute for example), this document must be located on the external memory of the device (SD card for example) to be accessible by other applications.
Example:
iDestination(iGenericPDF, CompleteDir(SysDirStorageCard()) + "document.pdf")
Caution: The PDF prints support the standard Adobe fonts only (no Unicode format): Courier, Helvetica, Times, Symbol and ZapFDingbats.
WINDEVWEBDEV - Server codeReports and QueriesWindowsAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystUser code (UMC)Ajax

Printing in PDF format

The generated PDF file can be directly printed by iPrintPDF.
Versions 23 and later
WINDEV The generated PDF file can be viewed via the PDF reader control.
New in version 23
WINDEV The generated PDF file can be viewed via the PDF reader control.
WINDEV The generated PDF file can be viewed via the PDF reader control.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax

Printing in HTML

  • If the print is performed in an HTML page with a style sheet (iHTMLCSS constant), the style sheet is included in the HTML file. The method for printing in an HTML file is identical to the method for printing on a printer. The layers are supported and the management of the font size is precise.
  • If the print is performed in an HTML page without style sheet (iHTML constant), the following limitations may occur:
    • management of font size not precise
    • overlay not supported. You cannot write on an image for example.
  • The fonts oriented at 90° are not printed properly in the HTML file: the text is displayed with an horizontal font.
  • The rounded borders are not printed. They are replaced by standard borders.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax

Printing in XLS

  • The Image, Bar Code and Chart controls are not printed.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax

Printing in RTF

  • Printing in RTF only supports the text (with its style) and the images. The overlay of objects is not supported (lines or images). Several text lines cannot be displayed beside an image for example.
  • The fonts oriented at 90° are not printed properly in the HTML file: the text is displayed with an horizontal font.
  • To print in RTF, the "RICHED20.DLL" file must be found on the current computer. In most cases, the "RICHED20.DLL" file is in the Windows system directory.
  • The borders are not printed.
  • Versions 20 and later
    The tables are supported by the RTF format. The font color and the background color of cells are stored.
    New in version 20
    The tables are supported by the RTF format. The font color and the background color of cells are stored.
    The tables are supported by the RTF format. The font color and the background color of cells are stored.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax

Configuring the printer for printing in HTML, RTF and text format

  • If the print is performed in a text file, only the text is retrieved: the lines, the images, ... are ignored.
  • Printing in HTML, RTF or text format depends on the configuration and on the resolution of the current printer. Therefore, if the current printer is configured in landscape mode with margins, these options will be used when printing in HTML, text or RTF format.
  • The finer the printer resolution is, the better the quality of the RTF, text or HTML print will be.
  • To avoid the overlapping problems when printing in HTML mode, you have the ability to adjust the printer settings.
WINDEVReports and QueriesWindowsUser code (UMC)

Printing in PRN format

When printing in PRN format, the PRN file is specific to the selected printer. This file is directly created by the printer driver, it is a binary file that can be interpreted by the printer.
This file can be printed thereafter on the specified printer or on any other printer of the same type via the "Print" command of DOS. The syntax of this command is:
Print /D:\\<Nom du poste>\<Nom de l'imprimante déclaré> <Nom du fichier prn>

Example:
Print /D:\\Poste_Doc\CanonLBP Sortie.prn

Remark: For a network printer, you must use the share name instead of the printer name. The share name is found in the "Share" tab of printer description.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax

Printing in XML

When printing in XML format, only the data is printed. The characteristics of the page layout (lines, ...) are ignored.
WINDEVWEBDEV - Server codeWindowsUser code (UMC)Ajax

Print characteristics

  • When printing in PDF, the characteristics of the PDF file can be configured with iParameterPDF.
  • When printing in XLS, the characteristics of the XLS file can be configured with iParameterXLS.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax

Printing on a fax

Two syntaxes can be used to send a print to a fax:
  • Fax without management of status report. The print (performed later by iPrintReport for example) is directly sent to the specified phone number.
  • Fax with management of status code. The print (performed thereafter by iPrintReport for example) is sent to the specified phone number, via a fax server. iPreview returns the identifier of connection to this fax server. This identifier, as well as the name given to the fax, allow you to check the status of the outgoing fax with the Fax functions. See Sending faxes for more details.
WINDEVWEBDEV - Server codeWindowsUser code (UMC)Ajax

Printing a fax in landscape mode

To configure the print of a fax in landscape mode (printing several faxes, including one in landscape mode), the print functions must be used in the following order:
  1. iDestination associated with the iFax constant.
  2. iParameter used to switch to landscape mode.
If this order is not respected, the setting of landscape mode will be ignored by the driver for fax management.
Example:
iDestination(iFax, "00046032032", "Fax")
iParameter("ORIENTATION=PAYSAGE")
iPrint("Impression en paysage")
iEndPrinting()
WINDEVWEBDEV - Server codeWindowsUser code (UMC)Ajax

Using a fax server installed on a computer other than the current computer

You have the ability to use a fax server installed on a computer other than the current computer. In this case, the computer where the fax server is installed must be running Windows Server 2003. The fax server must be shared. Then, the name of fax server must be specified in iDestination.
The computer from which the faxes will be sent must be equipped with a local fax server.
For example, if the fax server is installed on "FaxServer1", use the following syntax:
iDestination(iFax, "00046032032", "Fax", "\\ServeurFax1\Fax_Partage")
WINDEVReports and QueriesWindowsiPhone/iPadIOS WidgetMac CatalystUser code (UMC)

End of print

iEndPrinting must necessarily be called to end the print except after a call to iPrintReport.
The next prints will be performed on the printer except if iDestination is run again.
Business / UI classification: Neutral code
Component: wd270prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment