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

Notifications

Announcements

No record found.

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;


 
}
I have the same question (0)
  • Verified answer
    Kamal Khakhkhar Profile Picture
    1,274 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans