In french: iImprimeDuplicata
Prints a duplicate copy of a report. This duplicate copy can be printed:
- in the report viewer,
- on the printer,
- in a file (pdf, ...).
This duplicate copy was created:
- explicitly by iDestination (associated with the iDuplicate constant).
- directly from the report viewer (duplicate print option or iParameterDuplicate before starting the report viewer).
: To retrieve the list of duplicate copies created for the current print, use iLastFile
// Create the duplicate copy
// Print the duplicate copy in the report viewer
// Configure the duplicate copies performed from the report viewer
iParameterDuplicate(iDplPrintout, "C:\Temp", "MyDuplicate_%d_%h", "MMDDYYYY", "HHMMSS")
// Print a duplicate via the report viewer
// Browse the duplicate copies automatically created from the report viewer
sListDuplicates is string
sListDuplicates = iLastFile(iDuplicate)
sDuplicate is string
sDuplicate = ExtractString(sListDuplicates, firstRank, CR)
WHILE sDuplicate <> EOT
// Print the duplicate
// Go to the next duplicate
sDuplicate = ExtractString(sListDuplicates, nextRank, CR)
<Result> = iPrintDuplicate(<Duplicate file> [, <Password>])
- True if the duplicate copy was printed,
- False otherwise. To get the details of the error, use ErrorInfo.
<Duplicate file>: Character string
Name of the duplicate file (.dpl file) to print. The duplicate file is sought in the current directory by default. The full path of the duplicate file to print can be specified if necessary.
<Password>: Optional character string
Password of duplicate file to print. This password must be identical to the one used when creating the duplicate copy.
The common errors that can occur are as follows:
- 90025: Wrong password. The password used to create the duplicate file differs from the password used to open the duplicate file.
- 90026: Wrong format. The format of the duplicate file is incorrect. It is corrupted.
- 90027: Version too recent. The duplicate file was generated with a WINDEV or WEBDEV version that is more recent that the version used to read the duplicate file.
- iEndPrinting must not be used with iPrintDuplicate.
- The print functions must not be used when printing a duplicate. For example, the following code must not be used:
iPrint("This is forbidden")
Business / UI classification: Neutral code
This page is also available for…