PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 job 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
// Paramétrage du duplicata de la facture
iParameterDuplicate(iDplPrintout"C:\Temp", "MonDuplicata_%d_%h", ...
"JJJJ JJ MMMM AAAA", "HH.MM.SS")
 
// Impression avec duplicata depuis le visualisateur de rapports
iDestination(iViewer)
iPrintReport(ETAT_Facture)
Versions 16 and later
// Paramétrage du duplicata signé de la facture
MonCertificat is Certificate
SélectionCertificat is boolean
SélectionCertificat = CertificateSelect(MonCertificat)
 
// Annulation ou erreur
IF SélectionCertificat = False THEN RETURN
 
// Teste si le certificat sélectionné est valide pour signer
IF MonCertificat.ValidForSignature = False THEN
Info("Le certificat sélectionné ne permet pas de générer une signature.")
RETURN
END
 
iParameterDuplicate(iDplPrintout"C:\Temp", "MonDuplicata_%d_%h", ...
"JJJJ JJ MMMM AAAA", "HH.MM.SS")
iParameterDuplicate(iDplCertificate, MonCertificat)
 
// Impression avec duplicata depuis le visualisateur de rapports
iDestination(iViewer)
iPrintReport(ETAT_Facture)
New in version 16
// Paramétrage du duplicata signé de la facture
MonCertificat is Certificate
SélectionCertificat is boolean
SélectionCertificat = CertificateSelect(MonCertificat)
 
// Annulation ou erreur
IF SélectionCertificat = False THEN RETURN
 
// Teste si le certificat sélectionné est valide pour signer
IF MonCertificat.ValidForSignature = False THEN
Info("Le certificat sélectionné ne permet pas de générer une signature.")
RETURN
END
 
iParameterDuplicate(iDplPrintout"C:\Temp", "MonDuplicata_%d_%h", ...
"JJJJ JJ MMMM AAAA", "HH.MM.SS")
iParameterDuplicate(iDplCertificate, MonCertificat)
 
// Impression avec duplicata depuis le visualisateur de rapports
iDestination(iViewer)
iPrintReport(ETAT_Facture)
// Paramétrage du duplicata signé de la facture
MonCertificat is Certificate
SélectionCertificat is boolean
SélectionCertificat = CertificateSelect(MonCertificat)
 
// Annulation ou erreur
IF SélectionCertificat = False THEN RETURN
 
// Teste si le certificat sélectionné est valide pour signer
IF MonCertificat.ValidForSignature = False THEN
Info("Le certificat sélectionné ne permet pas de générer une signature.")
RETURN
END
 
iParameterDuplicate(iDplPrintout"C:\Temp", "MonDuplicata_%d_%h", ...
"JJJJ JJ MMMM AAAA", "HH.MM.SS")
iParameterDuplicate(iDplCertificate, MonCertificat)
 
// Impression avec duplicata depuis le visualisateur de rapports
iDestination(iViewer)
iPrintReport(ETAT_Facture)
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, etc.) 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 with their value. In this string:
  • YYYY represents the year,
  • M represents the month without a leading zero,
  • MM represents a 2-digit month,
  • MMM represents a 3-letter month (e.g., Jan)
  • MMMM represents the month as a full name (e.g., January)
  • D represents the day without a leading zero,
  • DD represents a 2-digit day,
  • DDD represents a 3-letter day (e.g., Mon)
  • DDDD represents the day as a full name (e.g., Monday).
If this parameter corresponds to the maskDateSystem 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" tab, 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
Time format used in the file name. 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 with their value. In this string:
  • HH represents the number of hours,
  • MM represents the number of minutes,
  • SS represents the number of seconds,
  • CC represents the number of hundredths of a second,
  • AP represents "AM" or "PM" (if "AM" is used, the time is displayed in 12-hour format).
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 the 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 the 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 the 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 report in the report viewer, the duplicate will be generated when the print job is started 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 printout is made on several different printers, a duplicate will be generated for each printer.
The configuration defined with the iParameterDuplicate function is used to:
  • duplicates generated during the print job
  • duplicates generated by the "Duplicate" option ( ) in the report viewer.
Remarks:
  • The list of duplicate files created for the last print run can be known using the iLastFile function.
  • To stop creating duplicates automatically from the report viewer, use the iParameterDuplicate function with the iDplNoneconstant.
  • If you do not want to print duplicates from the report viewer (option ), use the function iParameterViewer.
  • 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, etc.) available in the report viewer.
Component: wd270prn.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment