PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
This content comes from an automatic translation.
  • Printing a duplicate copy from the report viewer
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")
 
// Printing with duplicate from the report viewer
iDestination(iViewer)
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)
 
// Printing with duplicate from the report viewer
iDestination(iViewer)
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)
 
// Printing with duplicate from the report viewer
iDestination(iViewer)
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)
 
// Printing with duplicate from the report viewer
iDestination(iViewer)
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.
Remark: The duplicate is not generated if the user uses one of the export options (pdf, email,...) from the report viewer
<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.
Remark: From the report viewer, this signature will be used:
  • if the report is printed via the "Duplicate" export option ( ),
  • if the report is printed via the print option 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.
Remark: From the report viewer, this signature will be used:
  • if the report is printed via the "Duplicate" export option ( ),
  • if the report is printed via the print option 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.
Remark: From the report viewer, this signature will be used:
  • if the report is printed via the "Duplicate" export option ( ),
  • if the report is printed via the print option 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 report viewer

If a duplicate has been requested before displaying the printout in the Report Viewer, the duplicate will be generated when physically printing from the Report Viewer..
If an annotation or an edit control is modified in the report viewer, 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
  • duplicates generated by the "Duplicates" option ( ) in the report viewer.
Remarks:
  • The list of duplicate files created for the last print performed is returned by iLastFile.
  • To avoid creating a duplicate copy from the report viewer, use iParameterDuplicate associated with the iDplNone constant.
  • To avoid printing duplicates from the report viewer ( option), use the iParameterViewer function.
  • The duplicate copies are generated when printing on a printer only. Duplicates are not generated if the user uses one of the export options (pdf, email,...) provided in the report viewer.
Component : wd250prn.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment