web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Request page number of copies

(1) ShareShare
ReportReport
Posted on by 24
Hi all,
 
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;


 
}
  • Verified answer
    Kamal Khakhkhar Profile Picture
    3,612 Super User 2026 Season 2 on at
    Hii There,
    as per your question, You can apply group for it and Page Break between each instance of group. i have attached Snapshot for your reference.
     
    Thank You.
    Kamal Khakhkhar.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 727 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 512 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 321 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans