PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • When should iDestination be used?
  • Android: Printing in PDF format
  • 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
  • Printing via Bluetooth
  • Operating mode in GO mode and at run time
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
Configures the print destination.Configures and returns the print destination.
You have the ability to print:
  • on the printer directly (syntax 1 and 2).
    Windows Mobile In this version, the print can be performed on a PCL printer only.
    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).
  • in a file in text, HTM, RTF, PDF, PRN or XML format (syntax 3).
    Windows Mobile In this version, the print can be performed in a PCL file only.
    WEBDEV - Server code To obtain the same results during the development and on the deployed site, advise you to perform generic prints (with the iGenericPDF constant for example>, ...).
    AndroidiPhone/iPad In this version, the print can be performed in a PDF file only. AndroidiPhone/iPadUniversal Windows 10 App In this version, the print can be performed in a PDF file only.
  • Versions 15 and later
    a duplicate copy directly (syntax 4).
    New in version 15
    a duplicate copy directly (syntax 4).
    a duplicate copy directly (syntax 4).
  • on a fax directly (syntax 5 and 6, sending a report to a fax number for example). See Sending faxes for more details.
    Windows Mobile This feature is not available in this version.
Versions 18 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the 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 the Android applications.
Java This function is now available for the Java applications.
New in version 19
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
AndroidAndroid Widget iPhone/iPad Only the prints in PDF format are available.
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App 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 Note: 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 7 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 Note: 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 7 for more details.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVReports and Queries Note: 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 7 for more details.
Example
WINDEVWEBDEV - Server codeReports and QueriesWindowsAjaxUser code (UMC)
// Print in HTML format
iDestination(iHTML, "C:\My documents\MyReport.HTM")
// "C:My documents\MyReport.HTM" corresponds to the name and
// path of the HTM file that will be created with "RPT_MySummaryReport"
iPrintReport(RPT_MySummaryReport)
WINDEVWEBDEV - Server codeReports and QueriesWindowsLinuxAjaxUser code (UMC)
// Print in PDF format
FileName is string = CompleteDir(fDataDir()) + ...
"f" + Invoice + Customer + ".PDF"
iDestination(iGenericPDF, FileName)
iPrintReport(RPT_Invoice, Customer, Invoice)
// Checks whether it is a WEBDEV site
IF InWebMode() = True THEN
// Print performed from a WEBDEV site
// Send the file to the Web user
FileDisplay(FileName, "application/pdf")
Multitask(0)
// Delete the file from the server
fDelete(FileName)
END
WINDEVWEBDEV - Server codeReports and QueriesWindowsWindows MobileAjaxUser code (UMC)
// PCL printer to use
iDestination(iPCL, "\\MyNetwork\MyPrinter")
// Print in PCL format: iDestination(iPCL, "\My documents\MyFile.PCL")
WINDEVWEBDEV - Server codeReports and QueriesWindowsAjaxUser code (UMC)
// Generate a PRN file
iDestination(iPrinterFile, "C:\Temp\MyPrint.prn")
Versions 23 and later
WINDEVReports and QueriesWindowsUser code (UMC)
// Generate a PDF file and open the default messaging software
iDestination(iEmailPDF, "MyAttachment.PDF")

// Configure the email software (optional)
iParameterExport(iExportEmailRecipient, "Wam@CrazyMail.com; Celia.Wat@ZMail.fr")
iParameterExport(iExportEmailSender, "Itsme@Berrymail.com")
iParameterExport(iExportEmailSubject, "Result of yearly sales")

iPrintReport(RPT_MyReport)
New in version 23
WINDEVReports and QueriesWindowsUser code (UMC)
// Generate a PDF file and open the default messaging software
iDestination(iEmailPDF, "MyAttachment.PDF")

// Configure the email software (optional)
iParameterExport(iExportEmailRecipient, "Wam@CrazyMail.com; Celia.Wat@ZMail.fr")
iParameterExport(iExportEmailSender, "Itsme@Berrymail.com")
iParameterExport(iExportEmailSubject, "Result of yearly sales")

iPrintReport(RPT_MyReport)
WINDEVReports and QueriesWindowsUser code (UMC)
// Generate a PDF file and open the default messaging software
iDestination(iEmailPDF, "MyAttachment.PDF")

// Configure the email software (optional)
iParameterExport(iExportEmailRecipient, "Wam@CrazyMail.com; Celia.Wat@ZMail.fr")
iParameterExport(iExportEmailSender, "Itsme@Berrymail.com")
iParameterExport(iExportEmailSubject, "Result of yearly sales")

iPrintReport(RPT_MyReport)
Syntax
WINDEVWEBDEV - Server codeReports and QueriesJavaAjaxUser code (UMC)

Printing on the printer directly Hide the details

iDestination([<Destination> [, <Job Name>]])
<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.
<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.
WINDEVWEBDEV - Server codeWINDEV MobileReports 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 associated with the infrared port of Pocket PC, this parameter must correspond to:
  • the "IRDA:" string: if a single printer is enabled on the infrared port during the print.
  • the "IRDA:<Printer to use>" string: if several printers are enabled on the infrared port during the print.
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. See remarks for more details.
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.
Note: You have the ability to configure the elements of created email with iParameterExport.
WEBDEV - Server codeLinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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 setting is 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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 setting is very important. See remarks.
WEBDEV - Server codeLinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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 setting is 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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 setting is 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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 Windows MobileJava 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): Courrier, Helvetica, Times, Symbol and ZapFDingbats.
Windows Mobile This constant is not available.
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 setting is 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava 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 Certificate variable containing the certificate that will be used to sign the duplicate.
New in version 16
Name of Certificate variable containing the certificate that will be used to sign the duplicate.
Name of Certificate variable containing the certificate that will 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 QueriesAjaxUser code (UMC)

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 QueriesAjaxUser code (UMC)

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 occurred. 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 connection to the fax server returned by FaxConnect.
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 "Before re-printing" process: This constant is returned if the "Duplicate" button is used in the print preview.
Versions 21 and later
iEmail
New in version 21
iEmail
iEmail
Direct print in an email.
Use in the "Before re-printing" process: This constant is returned if the "Email with included content" button is used in the print preview.
Versions 21 and later
iEmailPDF
New in version 21
iEmailPDF
iEmailPDF
Direct print in a PDF attached to an email.
Use in the "Before re-printing" process: This constant is returned if the "Email with attached PDF" button is used in the print preview.
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 "Before re-printing" process: This constant is returned if the "HTML" button is used in the print preview.
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 "Before re-printing" process: This constant is returned if the "Print" button is used in the print preview.
iPCLDirect print in a PCL file.
iPDFDirect print in a PDF file.
Use in the "Before re-printing" process: This constant is returned if the "PDF" button is used in the print preview.
iGenericPDFDirect print in a PDF file.
iRTFDirect print in an RTF file.
Use in the "Before re-printing" process: This constant is returned if the "Word" button is used in the print preview.
iGenericRTFDirect print in an RTF file.
iXLSDirect print in an XLS file.
Use in the "Before re-printing" process: This constant is returned if the "XLS" button is used in the print preview.
iGenericXLSDirect print in an XLS file.
iXMLDirect print in an XML file.
Use in the "Before re-printing" process: This constant is returned if the "XML" button is used in the print preview.
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 "Before re-printing" process: This constant is returned if the "Duplicate" button is used in the print preview.
Versions 21 and later
iEmail
New in version 21
iEmail
iEmail
Direct print in an email.
Use in the "Before re-printing" process: This constant is returned if the "Email with included content" button is used in the print preview.
Versions 21 and later
iEmailPDF
New in version 21
iEmailPDF
iEmailPDF
Direct print in a PDF attached to an email.
Use in the "Before re-printing" process: This constant is returned if the "Email with attached PDF" button is used in the print preview.
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 "Before re-printing" process: This constant is returned if the "HTML" button is used in the print preview.
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 "Before re-printing" process: This constant is returned if the "Print" button is used in the print preview.
iPCLDirect print in a PCL file.
iPDFDirect print in a PDF file.
Use in the "Before re-printing" process: This constant is returned if the "PDF" button is used in the print preview.
iGenericPDFDirect print in a PDF file.
iRTFDirect print in an RTF file.
Use in the "Before re-printing" process: This constant is returned if the "Word" button is used in the print preview.
iGenericRTFDirect print in an RTF file.
iXLSDirect print in an XLS file.
Use in the "Before re-printing" process: This constant is returned if the "XLS" button is used in the print preview.
iGenericXLSDirect print in an XLS file.
iXMLDirect print in an XML file.
Use in the "Before re-printing" process: This constant is returned if the "XML" button is used in the print preview.
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 "Before re-printing" process: This constant is returned if the "Duplicate" button is used in the print preview.
Versions 21 and later
iEmail
New in version 21
iEmail
iEmail
Direct print in an email.
Use in the "Before re-printing" process: This constant is returned if the "Email with included content" button is used in the print preview.
Versions 21 and later
iEmailPDF
New in version 21
iEmailPDF
iEmailPDF
Direct print in a PDF attached to an email.
Use in the "Before re-printing" process: This constant is returned if the "Email with attached PDF" button is used in the print preview.
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 "Before re-printing" process: This constant is returned if the "HTML" button is used in the print preview.
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 "Before re-printing" process: This constant is returned if the "Print" button is used in the print preview.
iPCLDirect print in a PCL file.
iPDFDirect print in a PDF file.
Use in the "Before re-printing" process: This constant is returned if the "PDF" button is used in the print preview.
iGenericPDFDirect print in a PDF file.
iRTFDirect print in an RTF file.
Use in the "Before re-printing" process: This constant is returned if the "Word" button is used in the print preview.
iGenericRTFDirect print in an RTF file.
iXLSDirect print in an XLS file.
Use in the "Before re-printing" process: This constant is returned if the "XLS" button is used in the print preview.
iGenericXLSDirect print in an XLS file.
iXMLDirect print in an XML file.
Use in the "Before re-printing" process: This constant is returned if the "XML" button is used in the print preview.
iGenericXMLDirect print in an XML file.
Remarks

When should iDestination be used?

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.
Note: 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 you must open the PDF document generated by the print functions with an external application (via ShellExecute for example), this document must be found on the external memory of device (sdcard for example) in order to be accessible by the other applications.
Example:
iDestination(iGenericPDF, CompleteDir(SysDirStorageCard()) + "document.pdf")
Caution: The PDF prints support the standard Adobe fonts only (no Unicode format): Courrier, Helvetica, Times, Symbol and ZapFDingbats.
AndroidAndroid Widget iPhone/iPad

Printing in PDF format

The generated PDF file can be directly printed by iPrintPDF.
WINDEVWEBDEV - Server codeReports and QueriesWindowsAndroidAndroid Widget iPhone/iPadAjaxUser code (UMC)

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 QueriesWindowsAjaxUser code (UMC)

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 QueriesWindowsAjaxUser code (UMC)

Printing in XLS

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

Printing in RTF

  • Printing in RTF format 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 format, the "RICHED20.DLL" file must be found on the current computer. In most cases, the "RICHED20.DLL" file is found in the system directory of Windows.
  • The borders are not printed.
  • The tables are not supported by the RTF format.
    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 codeWEBDEV - Browser codeReports and QueriesWindowsAjaxUser code (UMC)

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.
  • WEBDEV - Browser code If no printer is connected to the server, a fictitious printer is used.
  • 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:\\<Computer name>\<Name of declared printer> <Name of PRN file>
Example:
Print /D:\\Doc_Computer\CanonLBP Output.prn
Note: 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 QueriesWindowsAjaxUser code (UMC)

Printing in XML

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

Print characteristics

  • When printing in PDF format, the characteristics of created PDF file can be configured by iParameterPDF.
  • When printing in XLS format, the characteristics of created XLS file can be configured by iParameterXLS.
WINDEVWEBDEV - Server codeReports and QueriesWindowsAjaxUser code (UMC)

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 outgoing fax with the Fax functions. See Sending faxes for more details.
WINDEVWEBDEV - Server codeWindowsAjaxUser code (UMC)

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=LANDSCAPE")
iPrint("Print in landscape mode")
iEndPrinting()
WINDEVWEBDEV - Server codeWindowsAjaxUser code (UMC)

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","\\FaxServer1\Fax_Share")
WINDEVReports and QueriesWindowsiPhone/iPadWindows MobileUser 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.
WINDEVWEBDEV - Server codeReports and QueriesWindowsWindows MobileUser code (UMC)

Printing via Bluetooth

To print via Bluetooth, you must:
  • use a PCL printer.
  • use a printer that supports the Bluetooth serial layer.
  • know the name of the Bluetooth virtual outgoing port. This name can be retrieved from the Bluetooth settings of the PC/Pocket PC or from the documentation of the PC/Pocket PC.
    In most cases, this name corresponds to "COM8:".
See Printing via Bluetooth for more details.
Windows Mobile

Operating mode in GO mode and at run time

In GO mode (simulation on the development computer), a WLanguage error is generated during the call to iDestination.
The differences between GO mode (simulator) and real use are presented in Differences between GO mode and real use.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230prn.dll
Windows Mobile wp230prn.dll
Java wd230java.jar
Linux wd230prn.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo IDestination
Exemplo IDestination
iDestination(iHTML,"E:\aleva\_relatorios\RelatoriosBanco.htm")
iPrintReport(RPT_bancos)
iDestination(iPDF,"E:\aleva\_relatorios\RelatoriosBanco.pdf")
iPrintReport(RPT_bancos)
iDestination(iHTMLWithoutCSS,"E:\aleva\_relatorios\RelatoriosBanco_1.htm")
iPrintReport(RPT_bancos)
iDestination(iRTF,"E:\aleva\_relatorios\RelatoriosBanco.rtf")
iPrintReport(RPT_bancos)
iDestination(iXLS,"E:\aleva\_relatorios\RelatoriosBanco.xls")
iPrintReport(RPT_bancos)
iDestination(iXML,"E:\aleva\_relatorios\RelatoriosBanco.xml")
iPrintReport(RPT_bancos)

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/08/windev-curso-relatorio-27-relatorio.html
https://www.youtube.com/watch?v=8LH2uCBAkFs
De matos AMARILDO
Aug. 01 2016
Exemplo Relatorio Pdf
IF CBOX_GeraPdf=True THEN
iDestination(iPDF,"Relatorio_Nome.pdf")
SINON
iPreview(ipvZoomPageWidth)
FIN
//pergunta se quer relatorio
filtro_data_inicial = EDT_data_inicial
filtro_data_final = EDT_data_Final
IF CBOX_Relatorio_Grafico = 1 THEN // Imprime com gráfico
iPrintReport(RPT_Material_Relatorio_Curva_ABC,filtro_data_inicial,filtro_data_final,1)
SINON // Imprime sem gráfico
iPrintReport(RPT_Material_Relatorio_Curva_ABC,filtro_data_inicial,filtro_data_final)
FIN
//Abrir pdf
IF CBOX_GeraPdf=True THEN
IF YesNo("Deseja Abrir Relatorio") THEN
ShellExecute("Relatorio_Nome.pdf")
FIN
END
//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/02/windev-curso-relatorio-20-relatorio.html
De matos AMARILDO
Feb. 26 2016