PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Printing a duplicate copy from the print preview
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 automatic creation of the duplicate copy generated during the next print (print on a physical printer):
  • name of duplicate file.
  • directory for duplicate creation.
  • password of duplicate.
  • Versions 16 and later
    signature of duplicate.
    New in version 16
    signature of duplicate.
    signature of duplicate.
This function must be used before starting the print for which a duplicate copy must be stored. This setting is taken into account for this print only.
The duplicate copies are available for the programmed reports (created by the iXXX functions) and for the reports generated by the report editor.
Example
// Configure the duplicate copy of invoice
iParameterDuplicate(iDplPrintout, "C:\Temp", "MyDuplicate_%d_%h", ...
"DDDD DD MMMM YYYY", "HH.MM.SS")

// Print with duplicate from the print preview
iPreview()
iPrintReport(RPT_Invoice)
Versions 16 and later
// Configure the signed duplicate of invoice
MyCertificate is Certificate
CertificateSelection is boolean
CertificateSelection = CertificateSelect(MyCertificate)

// Cancelation or error
IF CertificateSelection = False THEN RETURN

// Checks whether the selected certificate is valid for signing
IF MyCertificate..ValidForSignature = False THEN
Info("The selected certificate cannot be used to generate a signature.")
RETURN
END

iParameterDuplicate(iDplPrintout, "C:\Temp", "MyDuplicate_%d_%h", ...
"DDDD DD MMMM YYYY", "HH.MM.SS")
iParameterDuplicate(iDplCertificate, MyCertificate)

// Print with duplicate from the print preview
iPreview()
iPrintReport(RPT_Invoice)
New in version 16
// Configure the signed duplicate of invoice
MyCertificate is Certificate
CertificateSelection is boolean
CertificateSelection = CertificateSelect(MyCertificate)

// Cancelation or error
IF CertificateSelection = False THEN RETURN

// Checks whether the selected certificate is valid for signing
IF MyCertificate..ValidForSignature = False THEN
Info("The selected certificate cannot be used to generate a signature.")
RETURN
END

iParameterDuplicate(iDplPrintout, "C:\Temp", "MyDuplicate_%d_%h", ...
"DDDD DD MMMM YYYY", "HH.MM.SS")
iParameterDuplicate(iDplCertificate, MyCertificate)

// Print with duplicate from the print preview
iPreview()
iPrintReport(RPT_Invoice)
// Configure the signed duplicate of invoice
MyCertificate is Certificate
CertificateSelection is boolean
CertificateSelection = CertificateSelect(MyCertificate)

// Cancelation or error
IF CertificateSelection = False THEN RETURN

// Checks whether the selected certificate is valid for signing
IF MyCertificate..ValidForSignature = False THEN
Info("The selected certificate cannot be used to generate a signature.")
RETURN
END

iParameterDuplicate(iDplPrintout, "C:\Temp", "MyDuplicate_%d_%h", ...
"DDDD DD MMMM YYYY", "HH.MM.SS")
iParameterDuplicate(iDplCertificate, MyCertificate)

// Print with duplicate from the print preview
iPreview()
iPrintReport(RPT_Invoice)
Syntax

Configuring the duplicate file to create: directory, name, password, ... Hide the details

iParameterDuplicate(<Options> [, <Creation Directory> [, <Name of File to Print> [, <Date Format> [, <Time Format> [, <Password>]]]]])
<Options>: Integer constant
Options for creating the duplicate copies:
iDplNoneNo duplicate copy is created.
iDplPrintoutA duplicate is automatically created for each print performed on a printer.
Note: The duplicate copy is not generated if the user is using one of the export buttons (pdf, email, ...) from the print preview
<Creation Directory>: Optional character string
Path of directory for duplicate creation. This parameter corresponds to the current directory by default.
<Name of File to Print>: Optional character string
Name of file to print (with its extension). This name can contain the creation date and time of duplicate copy via the following tags:
  • %d to specify the creation date of duplicate copy.
  • %h to specify the creation time of duplicate copy.
Example: "MyDuplicate_%d_%h.dpl" will give "MyDuplicate_04092009_1426.dpl".
By default, the name of the created duplicate file corresponds to "Dupli_YYYYMMDD_HHMMSS.dpl".
<Date Format>: Optional character string
Format of the date used in the file name. This parameter can contain a word, a sentence, ... The specific characters representing the different elements of the date (YYYY, YY, MM or DD) will be automatically replaced by their value. In this string, the characters:
  • YYYY represent the year,
  • M represents the month (no zero is displayed in front of the month number),
  • MM represent the month on 2 digits,
  • MMM represent the month spelled out on 3 characters (for example: jan),
  • MMMM represent the month entirely spelled out (for example: january),
  • D represents the day (no zero is displayed in front of the day number),
  • DD represent the day on 2 digits,
  • DDD represent the day spelled out on 3 characters (for example: mon),
  • DDDD represent the day entirely spelled out (for example: monday).
If this parameter corresponds to the maskSystemDate constant, the format used corresponds to the format defined in the project description for the current language ("Project .. Project description", "Languages" tab).If this parameter corresponds to the maskSystemDate constant, the format used corresponds to the format defined in the project description for the current language. To define this format:
1. On the "Project" pane, in the "Project" group, click "Description".
2. Display the "Languages" tab.
If this parameter is not specified, the DD/MM/YYYY format is used by default.
<Time Format>: Optional character string
Format of the time used in the name of the file. This parameter corresponds to a character string (a sentence for example). The specific characters representing the different elements of the time (HH, MM, SS, CC or AP) will be automatically replaced by their value. In this string, the characters:
  • HH represent the number of hours,
  • MM represent the number of minutes,
  • SS represent the number of seconds,
  • CC represent the number of hundredths of a second,
  • AP represent "AM" or "PM" (if "AM" is found in the format, the time is displayed over 12 hours).
If this parameter is not specified, the result is in HH:MM:SS:CC format.
<Password>: Optional character string
Password of generated duplicate files.
Versions 16 and later

Configuring the signature of duplicate copy Hide the details

iParameterDuplicate(<Options> , <Certificate>)
<Options>: Integer constant
Options of duplicate copy:
iDplCertificateUses the specified certificate to sign the duplicate copy.
Note: From the print preview, this signature will be used:
  • if the report is printed via the "Duplicate" export button ( ),
  • if the report is printed via the print button on a printer.
<Certificate>: Certificate variable
Name of Certificate variable corresponding to the certificate that will be used to sign the duplicate.
New in version 16

Configuring the signature of duplicate copy Hide the details

iParameterDuplicate(<Options> , <Certificate>)
<Options>: Integer constant
Options of duplicate copy:
iDplCertificateUses the specified certificate to sign the duplicate copy.
Note: From the print preview, this signature will be used:
  • if the report is printed via the "Duplicate" export button ( ),
  • if the report is printed via the print button on a printer.
<Certificate>: Certificate variable
Name of Certificate variable corresponding to the certificate that will be used to sign the duplicate.

Configuring the signature of duplicate copy Hide the details

iParameterDuplicate(<Options> , <Certificate>)
<Options>: Integer constant
Options of duplicate copy:
iDplCertificateUses the specified certificate to sign the duplicate copy.
Note: From the print preview, this signature will be used:
  • if the report is printed via the "Duplicate" export button ( ),
  • if the report is printed via the print button on a printer.
<Certificate>: Certificate variable
Name of Certificate variable corresponding to the certificate that will be used to sign the duplicate.
Remarks

Printing a duplicate copy from the print preview

If a duplicate copy was requested before the print is displayed in the print preview, the duplicate copy will be generated during the physical print performed from the print preview.
If an annotation or an edit control is modified in the print preview, a new duplicate copy will be generated during the next physical print.
If the print is performed on several printers, a duplicate copy will be generated for each printer.
The configuration defined by iParameterDuplicate is used for:
  • the duplicate copies generated during the print
  • the duplicate copies generated by the "Duplicate" button ( ) found in the print preview.
Notes:
  • The list of duplicate files created for the last print performed is returned by iLastFile.
  • To avoid creating a duplicate copy from the print preview, use iParameterDuplicate associated with the iDplNone constant.
  • To avoid proposing the print of duplicate copies from the print preview ( button), use iParameterPreview.
  • The duplicate copies are generated when printing on a printer only. The duplicate copy is not generated if the user is clicking one of the export buttons (pdf, email, ...) proposed in the print preview.
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