PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Creating a duplicate copy from the print preview
  • Print available by default
  • Customizing the created duplicate copy
  • Customizing the preview window
  • Creating a duplicate copy by programming
  • Signing a duplicate copy
  • Using a duplicate copy
  • Colored bars
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
Overview
For legal reasons, it may be useful to keep an identical copy of a report (an invoice for example).
Furthermore, due to the large amount of data to process (statistical reports for example), some reports may take quite a long time to generate.
The Duplicate feature automatically proposes a solution to fix this problem.
The principle is straightforward: When editing a report (report created in the report editor or by programming), its identical copy can be generated and stored in a file in ".dpl" format.
This allows you to re-edit a duplicate copy of the report. The data is not processed again so it is protected against the modifications and this re-edit operation is performed immediately.
The creation of a duplicate copy can be performed:
  • from the print preview (WINDEV only).
  • by programming.
Versions 16 and later
You have the ability to sign a duplicate copy via a certificate:
  • from the print preview.
  • by programming.
New in version 16
You have the ability to sign a duplicate copy via a certificate:
  • from the print preview.
  • by programming.
You have the ability to sign a duplicate copy via a certificate:
  • from the print preview.
  • by programming.
Notes:
  • Printing a report with duplicate copies slows the print down. Indeed, the duration for creating the duplicate copy is included in the print duration. We advise you to run performances tests.
  • Printing a page of a report with duplicate copy triggers the creation of the duplicate copy for the entire report.
Creating a duplicate copy from the print preview
WINDEVReports and Queries

Print available by default

The print preview proposes a button ( Duplicate icon available in the preview ) allowing the user to create a duplicate copy of the report currently displayed. By default, the "Export" pane of the print preview proposes the "Duplicate" option allowing the use to create a duplicate copy of the report currently displayed.
When selecting this option, a file picker allows the user to:
  • enter the name of the duplicate file that will be created.
  • Versions 16 and later
    specify the certificate that will be used to sign the duplicate. The signature of the duplicate is optional.
    New in version 16
    specify the certificate that will be used to sign the duplicate. The signature of the duplicate is optional.
    specify the certificate that will be used to sign the duplicate. The signature of the duplicate is optional.
By default, the duplicate:
  • is saved in the directory of the application.
  • has no password.
  • is named: Dupli_YYYYMMDD_HHMMSS.dpl.
Notes:
  • To avoid proposing the print of duplicate copies, use iParameterPreview (associated with the iButtonDuplicate constant).
  • To modify the default parameters of the duplicate copy, use iParameterDuplicate before displaying the print preview.
WINDEVReports and Queries

Customizing the created duplicate copy

To modify the default parameters for the duplicate copies created from the print preview, you have the ability to use iParameterDuplicate associated with the iDplPrintout constant.
Example:
// Configure the duplicate copy of invoice
iParameterDuplicate(iDplPrintout, "C:\Temp", ...
"MyDuplicate_%d_%t", "DDDD DD MMMM YYYY", "HH.MM.SS")

// Print the duplicate
iPreview()
iPrintReport(RPT_Invoice)
iParameterDuplicate is used to:
  • customize the duplicate options proposed by default by the "Duplicate copy" option found in the print preview.
  • automate the print of a duplicate copy from the print preview. Indeed:
    • the duplicate copy will be generated during the 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 printout.
    • if the print is performed on several printers, a duplicate copy will be generated for each printer.
Note: The list of duplicate copies created during the last print is returned by iLastFile.
WINDEVReports and Queries

Customizing the preview window

If the preview window was customized, to manage the duplicate copies, you must:
  1. Import the new preview window.
  2. Copy the button for creating the duplicate copy.
See Customizing the preview window for more details.
Creating a duplicate copy by programming
To create a duplicate copy by programming:
  1. Use iParameterDuplicate (associated with the iDplPrintout constant) to configure the options for creating the duplicate copies.
  2. Use iDestination and specify that the print must be performed on a printer. The duplicate copy will be created while the print is performed.
To stop printing the duplicate copies, use iParameterDuplicate (associated with the iDplNone constant).
Signing a duplicate copy
Versions 16 and later
The duplicate copies can be signed via a certificate. This signature ensures the integrity of the reports stored. The signature is included in the duplicate.
This signature automatically perform a timestamp. If may be required legally for some uses.
The signature standard used is PKCS7.
You have the ability to sign a duplicate copy via a certificate:
Versions 21 and later
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
New in version 21
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
New in version 16
The duplicate copies can be signed via a certificate. This signature ensures the integrity of the reports stored. The signature is included in the duplicate.
This signature automatically perform a timestamp. If may be required legally for some uses.
The signature standard used is PKCS7.
You have the ability to sign a duplicate copy via a certificate:
Versions 21 and later
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
New in version 21
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
The duplicate copies can be signed via a certificate. This signature ensures the integrity of the reports stored. The signature is included in the duplicate.
This signature automatically perform a timestamp. If may be required legally for some uses.
The signature standard used is PKCS7.
You have the ability to sign a duplicate copy via a certificate:
Versions 21 and later
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
New in version 21
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
Note: If the report includes a Signature control (linked to a certificate) or if iPrintSignature is used, the duplicate will be automatically signed during its creation. See Signature control for more details.
Using a duplicate copy
To use an existing duplicate copy, you can:
  • drop the ".dpl" file into the editor of WINDEV or WEBDEV: the duplicate copy is automatically opened in the print preview and it can be printed.
  • use iPrintDuplicate. This function is used to print the specified ".dpl" file. To display the duplicate copy in the print preview, all you have to do is use iPreview. For example:
    iPreview()
    iPrintDuplicate("C:\My Projects\My_Project\Exe\Dupli_20101021_112712.dpl")
Versions 17 and later
WINDEV Viewer of duplicate copies
Installed with the application on the end-user computer, this viewer is used to easily view and print the content of a duplicate file. To do so, double-click the ".dpl" file.
To install this tool, select the optional "DplViewer" tool in the wizard for generating the setup program.
New in version 17
WINDEV Viewer of duplicate copies
Installed with the application on the end-user computer, this viewer is used to easily view and print the content of a duplicate file. To do so, double-click the ".dpl" file.
To install this tool, select the optional "DplViewer" tool in the wizard for generating the setup program.
WINDEV Viewer of duplicate copies
Installed with the application on the end-user computer, this viewer is used to easily view and print the content of a duplicate file. To do so, double-click the ".dpl" file.
To install this tool, select the optional "DplViewer" tool in the wizard for generating the setup program.

Colored bars

When displaying a duplicate copy in the print preview, several bars may appear at the bottom of the preview to inform the user of the duplicate file used:
Versions 17 and later
WINDEV Viewer of duplicate copies
These color bars are also available in the viewer of duplicate copies.
New in version 17
WINDEV Viewer of duplicate copies
These color bars are also available in the viewer of duplicate copies.
WINDEV Viewer of duplicate copies
These color bars are also available in the viewer of duplicate copies.
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment