ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Common errors
  • Limitations
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
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).
Remark: It is possible to retrieve the list of duplicates created for the current print run using the iLastFile function..
Example
// Création du duplicata
iDestination(iDuplicate, "C:\Temp\MonDuplicata.dpl")
iPrintReport(ETAT_Facture)

// Impression du duplicata dans le visualisateur de rapports
iDestination(iViewer)
iPrintDuplicate("C:\Temp\MonDuplicata.dpl")
// Paramétrage des duplicata réalisés depuis le visualisateur de rapports
iParameterDuplicate(iDplPrintout, "C:\Temp", "MonDuplicata_%d_%h", "MMJJAAAA", "HHMMSS")

// Impression d'un duplicata via le visualisateur de rapports
iDestination(iViewer)
iPrintReport(ETAT_Facture)

// Parcours des duplicata créés automatiquement depuis le visualisateur de rapports
sListeDuplicata is string
sListeDuplicata = iLastFile(iDuplicate)
sDuplicata is string
sDuplicata = ExtractString(sListeDuplicata, firstRank, CR)
WHILE sDuplicata <> EOT
	// Impression du duplicata
	iPrintDuplicate(sDuplicata)
	// Passage au duplicata suivant
	sDuplicata = ExtractString(sListeDuplicata, nextRank, CR)
END
Syntax
<Result> = iPrintDuplicate(<Duplicate file> [, <Password>])
<Result>: Boolean
  • True if the duplicate has been printed,
  • False otherwise. To get more details on 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 string or Secret string
Password of duplicate file to print. This password must be identical to the one used when creating the duplicate copy.
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
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 corrupt.
  • 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:
    iDestination(iViewer)
    iPrint("Ceci est interdit")
    iPrintDuplicate("C:\Temp\MonDuplicata.dpl")
Business / UI classification: Neutral code
Component: wd300prn.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/16/2025

Send a report | Local help