AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Editores / Editor de reportes / Crear un reporte mediante programación
  • Overview
  • Creating a duplicate from the report viewer
  • Print available by default
  • Customizing the created duplicate copy
  • Customizing the report viewer
  • Creating a duplicate copy programmatically
  • Signing a duplicate copy
  • Using a duplicate copy
  • Colored bars
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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 simple: when a report is edited (a report created in the report editor or by programming), its exact copy can be generated in a file in ".dpl" format, and can be stored in the report editor..
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 report viewer (WINDEV only).
  • programmatically.
You have the ability to sign a duplicate copy via a certificate:
  • from the report viewer.
  • through programming.
Remarks:
  • 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 performance tests.
  • Printing a page of a report with duplicate copy triggers the creation of the duplicate copy for the entire report.
Creating a duplicate from the report viewer
WINDEVReportes y Consultas

Print available by default

By default, the "Export" pane of the report viewer offers the "Duplicate" option to create a duplicate of the report being displayed.
Export pane
When this option is selected, a file picker allows the user to:
  • enter the name of the duplicate file that will be created.
  • specify the certificate that will be used to sign the duplicate. The signature of the duplicate is optional.
By default, the duplicate copy:
  • is saved in the directory of the application.
  • has no password.
  • is named: Dupli_YYYYMMDD_HHMMSS.dpl.
Remarks:
  • To disable the option to create duplicates, use iParameterViewer (iButtonDuplicate constant).
  • To modify the default parameters of the duplicate copy, use iParameterDuplicate before opening the report viewer.
WINDEVReportes y Consultas

Customizing the created duplicate copy

To modify the default parameters for the duplicates created from the report viewer, you can use iParameterDuplicate with the iDplPrintout constant.
Example:
// Configure the duplicate copy of invoiceiParameterDuplicate(iDplPrintout, "C:\Temp", ...
"MyDuplicate_%d_%t", "DDDD DD MMMM YYYY", "HH.MM.SS")
 
// Print the duplicate
iDestination(iViewer)
iPrintReport(RPT_Invoice)

iParameterDuplicate can be used to:
  • customize the duplicate options proposed by default by the "Duplicate" option found in the report viewer.
  • automate the print of a duplicate from the report viewer. Indeed:
    • the duplicate will be generated when 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 printout.
    • if the print is performed on several printers, a duplicate copy will be generated for each printer.
Remark: The list of duplicates created during the last printing can be known thanks to the iLastFile function..
WINDEVReportes y Consultas

Customizing the report viewer

If you have customized the report viewer with a version that does not support this option, to manage duplicates, simply:
  1. Import the new report viewer window.
  2. Copy the button for creating the duplicate.
For more details, see Customizing the report viewer.
Creating a duplicate copy programmatically
To create a duplicate copy through 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
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:
Remark: If the report includes a Signature field (linked to a certificate) or if the iPrintSignature function is used, the duplicate will be automatically signed when it is created.. For more details, see Signature control.
Using a duplicate copy
To use an existing duplicate copy, you can:
  • drop the ".dpl" file into the WINDEV or WEBDEV editor: the duplicate automatically opens in the report viewer and can be printed..
  • use the iPrintDuplicate function. This function is used to print the specified ".dpl" file. To display the duplicate copy in the report viewer, all you have to do is use iDestination. For example:
    iDestination(iViewer)iPrintDuplicate("C:\My Projects\My_Project\Exe\Dupli_20101021_112712.dpl")
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 a duplicate is displayed in the report viewer, several bars may appear at the bottom of the viewer to inform the user of the duplicate file used: centeralt=Colored bars
WINDEV Viewer of duplicate copies
These color bars are also available in the viewer of duplicate copies.
Versión mínima requerida
  • Versión 15
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local