Configures the print destination.Configures and returns the print destination.

You have the ability to print:

on the printer directly (syntax 1 and 2). In this version, the print can be performed on a PCL printer only. 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). In this version, the print can be performed in a PCL file only. 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>, ...). In this version, the print can be performed in a PDF file only. In this version, the print can be performed in a PDF file only.

Versions 15 and latera duplicate copy directly (syntax 4).

New in version 15a 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. This feature is not available in this version.

Versions 18 and later

This function is now available for the iPhone/iPad applications.

New in version 18

This function is now available for the iPhone/iPad applications.

This function is now available for the iPhone/iPad applications.

Versions 19 and later

This function is now available in Android Widget mode.

This function is now available for Android applications.

This function is now available for the Java applications.

New in version 19

This function is now available in Android Widget mode.

This function is now available for Android applications.

This function is now available for the Java applications.

This function is now available in Android Widget mode.

This function is now available for Android applications.

This function is now available for the Java applications.

Only the prints in PDF format are available.

Only the prints in PDF format are available.

Versions 21 and later

This function is now available in Universal Windows 10 App mode.

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

This function is now available in Universal Windows 10 App mode.

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.

This function is now available in Universal Windows 10 App mode.

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

// Print in HTML formatiDestination(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)

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.

This constant is not available.

<Job name>: Optional character string (with quotes)

For direct printing (iPrinter constant), it corresponds to the name to be given to the printout. This name will be used to identify the print in the list of jobs processed by the printer.

Versions 24 and laterFor 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 24For 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.

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.

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 lateriEmailPDF

New in version 23iEmailPDF

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 the created email with iParameterExport.

This constant is not available.

iFile

Direct 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.

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.

This constant is not available.

iGenericFile

Direct 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.

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.

This constant is not available.

iPrinterFile

Direct 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.

This constant is not available.

iHTML

Direct 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.

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.

This constant is not available.

iGenericHTML

Direct 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.

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.

This constant is not available.

iHTMLWithoutCSS

Direct 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.

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.

This constant is not available.

iGenericHTMLWithoutCSS

Direct 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.

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.

This constant is not available.

iPCL

Direct 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&gt.PCL.

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.

This constant is not available.

iPDF

Direct 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&gt.PDF.

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.

This constant is not available.

iGenericPDF

Direct 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.

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.

Direct 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.

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.

This constant is not available.

iGenericRTF

Direct 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.

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.

This constant is not available.

iXLS

Direct 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.

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.

This constant is not available.

iGenericXLS

Direct 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.

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.

This constant is not available.

iXML

Direct 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.

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.

This constant is not available.

iGenericXML

Direct 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.

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.

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.

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.

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 laterName of Certificate variable containing the certificate that will be used to sign the duplicate.

New in version 16Name 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 laterPassword of generated duplicate.

New in version 16Password of generated duplicate.

Password of generated duplicate.

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.

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

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.

Note: iDestination can be called before printing a report (with iPrintReport) to choose the print destination.

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 (by using ShellExecute for example), this document must be found on the external memory of the device (sdcard for example) in order to be accessible by the other applications.Example:

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.

Printing in XLS

The Image, Bar Code and Chart controls are not printed.

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 laterThe tables are supported by the RTF format. The font color and the background color of cells are stored.

New in version 20The 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.

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.

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:

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.

Printing in XML

When printing in XML format, only the data is printed. The characteristics of the page layout (lines, ...) are ignored.

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.

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.

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:

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:

The next prints will be performed on the printer except if iDestination is run again.

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:".