I have created the following report to print labels. With the following code, I get the number of copies I address in the request page, which is good.
However, I would like to have the copies all on a different page. Can anyone help me?
report 60128 riemetiket
{
ApplicationArea = All;
Caption = 'Riemetiketten';
UsageCategory = Documents;
DefaultRenderingLayout = riemetiketsmal;
PreviewMode = PrintLayout;
dataset
{
dataitem(CopyLoop; Integer)
{
DataItemTableView = sorting(Number);
column(Number; Number)
{
}
dataitem(/Sales Header/; /Sales Header/)
{
DataItemTableView = sorting(/Document Type/, /No./) where(/Document Type/ = const(Order));
RequestFilterFields = /No./;
column(No_SalesHeader; /No./)
{
IncludeCaption = true;
}
column(ExternalDocumentNo; /Sales Header/./External Document No./) { }
dataitem(SalesLine; /Sales Line/)
{
DataItemLink = /Document Type/ = field(/Document Type/), /Document No./ = field(/No./);
DataItemTableView = sorting(/Document Type/, /Document No./, /Line No./) where(type = const(Item));
RequestFilterFields = /Line No./;
RequestFilterHeading = 'Verkoopregel';
column(Line_No_; /Line No./)
{
}
column(Description; Description)
{
}
column(Description2; /Description 2/)
{
}
column(No; /No./)
{
}
column(DocumentNo; /Document No./)
{
}
column(DocumentType; /Document Type/)
{
}
dataitem(Item; Item)
{
DataItemLink = /No./ = field(/No./);
DataItemLinkReference = SalesLine;
column(Common_Item_No; /Common Item No./)
{ }
column(Barcode; EncodedText)
{ }
trigger OnAfterGetRecord()
begin
GenerateBarcode();
end;
}
}
}
trigger OnPreDataItem()
begin
SetRange(Number, 1, NoOfCopies + 1);
end;
}
}
requestpage
{
SaveValues = true;
layout
{
area(content)
{
group(Opties)
{
field(/Aantal Exemplaren/; NoOfCopies)
{
ApplicationArea = All;
Caption = 'Aantal kopies';
ToolTip = 'Hoeveel kopies van een exemplaar er afgedrukt worden';
}
}
}
}
actions
{
area(processing)
{
}
}
}
rendering
{
layout(Riemetiketmiddel)
{
Type = RDLC;
Caption = 'Riemetiket Middel';
Summary = 'Riemetiket geprint op middel formaat';
LayoutFile = './layouts/riemetiketmiddel.rdl';
}
layout(Riemetiketsmal)
{
Type = RDLC;
Caption = 'Riemtetiket smal';
Summary = 'Riemetiket geprint op smal formaat';
LayoutFile = './layouts/riemetiketsmal.rdl';
}
layout(RiemetiketAlvoen)
{
Type = RDLC;
Caption = 'Riemtetiket Alvoen';
Summary = 'Riemetiket geprint voor Alvoen';
LayoutFile = './layouts/riemetiketalvoen.rdl';
}
}
local procedure GenerateBarcode()
var
BarcodeSymbology: Enum /Barcode Symbology/;
BarcodeFontProvider: Interface /Barcode Font Provider/;
BarCodeString: Text;
begin
BarcodeFontProvider := Enum::/Barcode Font Provider/::IDAutomation1D;
BarcodeSymbology := Enum::/Barcode Symbology/::Code39;
BarCodeString := Item./Common Item No./;
BarcodeFontProvider.ValidateInput(BarCodeString, BarcodeSymbology);
EncodedText := BarcodeFontProvider.EncodeFont(BarCodeString, BarcodeSymbology);
end;
var
EncodedText: Text;
NoOfCopies: Integer;
CopyText: Text[30];
procedure InitializeRequest(NewNoOfCopies: Integer)
begin
NoOfCopies := NewNoOfCopies;
end;
}