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...
Suggested Answer

Select Print Report

(0) ShareShare
ReportReport
Posted on by 55

Hello, 

When a customer want to print a quote, he should be to choose between 2/3 different reports (For exemple, one report with price, another without price, ...) 

I use this code to let the choice when printing. 

pageextension 50101 "Sales Order Ext" extends "Sales Order"
{
    layout
    {
        // Add changes to page layout here
    }

    actions
    {
        modify("Print Confirmation")
        {
            Visible = false;
        }
        addafter("Pick Instruction")
        {
            action(MyCustomAction)
            {
                ApplicationArea = All;

                Caption = 'My Print Confirmation';


                trigger OnAction()
                var
                    Selection: Integer;
                    OptionMembersLbl: Label 'Report 204,Report 205,Report 206';
                    optionInstructionLbl: Label 'Choose one of the following';
                begin
                    Selection := Dialog.StrMenu(OptionMembersLbl, 2, optionInstructionLbl);
                    case Selection of
                        0:
                            exit; //  User clicked on Cancel
                        1:
                            Report.Run(204);
                        2:
                            Report.Run(205);
                        3:
                            Report.Run(206);
                    end;
                end;
            }
        }

    }

    var
        myInt: Integer;
}

It's work if the report doesn't have the same id. 

How can I do to let the choice between different report with the id 204 ?

Thanks for your help.

Maxence

I have the same question (0)
  • Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Sorry, not so clear the question to me and maybe I've not understood. If the report ID is 204, it's one single object. You can have more choices that points to the single report, like:

    case Selection of

    0,1: Report.Run(204).

  • Maxence Profile Picture
    55 on at

    For the Quote, I have 4 different layout (1304 - Quotes)

    QuoteReport.PNG

    I would like to have the choice between the 4 reports 1304 when I'm printing.

    It's it possible to do this ?

    Thanks.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Choosing when printing is not a standard possibility. You should dinamycally change the layout based on conditions.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,986 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,071 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 975 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans