PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Common errors
  • Limitations
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
Prints a duplicate copy of a report. This duplicate copy can be printed:
  • in the print preview,
  • on the printer,
  • in a file (pdf, ...).
This duplicate copy was created:
  • explicitly by iDestination (associated with the iDuplicate constant).
  • from the print preview (button for printing the duplicate copy or with iParameterDuplicate used before starting the print preview).
Note: To retrieve the list of duplicate copies created for the current print, use iLastFile.
Example
// Create the duplicate copy
iDestination(iDuplicate, "C:\Temp\MyDuplicate.dpl")
iPrintReport(RPT_Invoice)

// Print the duplicate copy in the print preview
iPreview()
iPrintDuplicate("C:\Temp\MyDuplicate.dpl")
// Configure the duplicate copies performed from the print preview
iParameterDuplicate(iDplPrintout, "C:\Temp", "MyDuplicate_%d_%h", "MMDDYYYY", "HHMMSS")

// Print a duplicate copy
iPreview()
iPrintReport(RPT_Invoice)

// Browse the duplicate copies automatically created from the preview
sListDuplicates is string
sListDuplicates = iLastFile(iDuplicate)
sDuplicate is string
sDuplicate = ExtractString(sListDuplicates, firstRank, CR)
WHILE sDuplicate <> EOT
// Print the duplicate
iPrintDuplicate(sDuplicate)
// Go to the next duplicate
sDuplicate = ExtractString(sListDuplicates, nextRank, CR)
END
Syntax
<Result> = iPrintDuplicate(<File Name> [, <Password>])
<Result>: Boolean
  • True if the duplicate copy was printed,
  • False otherwise. To find out the error details, use ErrorInfo.
<File Name>: Character string (with quotes)
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 (with quotes)
Password of duplicate file to print. This password must be identical to the one used when creating the duplicate copy.
Remarks

Common errors

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.

Limitations

  • 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:
    iPreview()
    iPrint("This is forbidden")
    iPrintDuplicate("C:\Temp\MyDuplicate.dpl")
Components
WINDEVWEBDEV - Server codeReports and Queries wd230prn.dll
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment