Print Multiple Copies — Microsoft Dynamics NAV

Print Multiple Copies — Microsoft Dynamics NAV

Imprimir varias copias de un informePrint multiple copies of a report

Implementación de CopyLoop en el informe 206 de Microsoft Dynamics NAVCopyLoop implementation in Microsoft Dynamics NAV report 206

Report 206 · C/AL · RDLC
ObjetivoObjective

Añadir un bucle de copias al informe de facturaAdd a copy loop to the invoice report

El ejemplo parte del informe estándar 206, eliminando la lógica anterior relacionada con la copia de páginas. La nueva solución utiliza un DataItem Integer para repetir el informe según el número de copias indicado.The example starts from the standard report 206, with the previous page-copying logic removed. The new solution uses an Integer DataItem to repeat the report according to the requested number of copies.

Referencia inicialStarting reference

Utiliza el archivo sin bucle para comparar la modificación paso a paso.Use the no-loop file to compare the modification step by step.

1

Añade CopyLoop como primer DataItemAdd CopyLoop as the first DataItem

Crea un DataItem de tipo Integer llamado CopyLoop antes de Sales Invoice Header.Create an Integer DataItem named CopyLoop before Sales Invoice Header.

Estructura de DataItems del informe.Report DataItem structure.
2

Controla el número de iteracionesControl the number of iterations

Obtén NoOfCopies desde la página de solicitud, establece el rango del DataItem y actualiza OutputNo para cada copia.Read NoOfCopies from the request page, set the DataItem range and update OutputNo for each copy.

Triggers OnPreDataItem, OnAfterGetRecord y OnPostDataItem.OnPreDataItem, OnAfterGetRecord and OnPostDataItem triggers.
3

Envía OutputNo al diseñoSend OutputNo to the layout

Añade OutputNo como columna del DataItem para que esté disponible en el dataset del informe.Add OutputNo as a DataItem column so it becomes available in the report dataset.

Columna OutputNo expuesta en el dataset.OutputNo column exposed in the dataset.
4

Agrupa el diseño por OutputNoGroup the layout by OutputNo

En las propiedades del grupo RDLC, añade OutputNo como segunda expresión para generar una instancia del diseño por cada copia.In the RDLC group properties, add OutputNo as the second expression to generate one layout instance for each copy.

Propiedades del grupo en el diseño RDLC.Group properties in the RDLC layout.
ResumenSummary
CopyLoop

Repite el dataset mediante un DataItem Integer.Repeats the dataset through an Integer DataItem.

OutputNo

Identifica cada iteración y se envía al diseño.Identifies each iteration and is sent to the layout.

RDLC Group

Separa visualmente cada copia del documento.Visually separates each copy of the document.

Microsoft Dynamics NAV · Report 206 · CopyLoop

Comentarios