|
|
|
|
|
- Printing a duplicate copy from the report viewer
iParameterDuplicate (Function) In french: iParamètreDuplicata 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.
- 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. // Configure the duplicate copy of invoice iParameterDuplicate(iDplPrintout, "C:\Temp", "MyDuplicate_%d_%h", ... "DDDD DD MMMM YYYY", "HH.MM.SS") Â // Print with duplicate from report viewer iDestination(iViewer) iPrintReport(RPT_Invoice)
// Configure the signed duplicate of invoice MyCertificate is Certificate CertificateSelection is boolean CertificateSelection = CertificateSelect(MyCertificate) Â // Cancellation 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 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: | | iDplNone | No duplicate copy is created. | iDplPrintout | A 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.
Configuring the signature of duplicate copy Hide the details
iParameterDuplicate(<Options> , <Certificate>)
<Options>: Integer constant Options of duplicate copy: | | iDplCertificate | Uses 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 :
![](https://doc.windev.com/en-US/images/image.awp?langid=3&name=ico_duplicata.gif&548594350) - 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 print job is performed on several printers, a duplicate copy will be generated for each printer. The configuration defined by iParameterDuplicate is used for: - duplicates generated during the print job
- 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 stop creating automatic duplicates from the report viewer, use iParameterDuplicate with the iDplNone constant.
- To disable the option to create duplicates in the report viewer (
), use 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|