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

How to select print report

(0) ShareShare
ReportReport
Posted on by 55

Hello, 

When the user print a quote or invoice, I would like to let him the choice to select the report that he would be print. 

Is it possible ? 

I have seen that we can add more than one report to a type of document (quote for example), but how put one report by default ?

Thanks for your help. 

Maxence

  • Lars Lohndorf-Larsen Profile Picture
    Microsoft Employee on at

    Hi Maxene,

    Just like you say, users can go to "Report Selections" and choose which report(s) to run. And they can choose more than one report in which case they will be run sequentially, and here the user could cancel the one(s) they did not want. But I guess that this is not exactly what they are requesting.

    If you want to have a small list to choose from when you print the report, then a simple way would be to just show a small strmenu-list (providing you have access to development) like this:

               action(SelectPrint)

               {

                   ApplicationArea = all;

                   Caption = 'Print select';

                   trigger OnAction()

                   begin

                       case StrMenu('Report A,Report B,Report C') of

                           1:  Report.Run(1);

                           2:  Report.Run(2);

                           3:  Report.Run(3);

                       end;

                   end;

               }

    Would that work? Or if it needs to be a bit more flexible, have an underlying table where you can put available reports, then run a page modally to choose from. If you like, I could make a sample of that.

    Is that the kind of thing you were looking for?

  • Maxence Profile Picture
    55 on at

    Hi, 

    Thanks for the exemple. 

    I managed to create a new action in the menu bar. But I can't display this list when the user click on print. 

    Maxence

  • Verified answer
    Binesh Profile Picture
    7,887 on at

    Hello,

    You have to hide the standard action, and then write your action as shown below.

    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;
    }

    I have checked and it's working.

    pastedimage1592116346865v2.png

    pastedimage1592116361654v3.png

  • Maxence Profile Picture
    55 on at

    Hi, 

    Thanks a lot for your help. 

    I have a last question about that. 

    Is it possible to insert this action in the 'Print/Send' group's and not in the 'Action' group's ?

  • Verified answer
    Binesh Profile Picture
    7,887 on at

    Yes,

    Add the below properties in your action

        Promoted = true;

        PromotedCategory = Category11;

    For your reference see the Sales Order page properties

       PromotedActionCategories = 'New,Process,Report,Approve,Release,Posting,Prepare,Order,Request Approval,History,Print/Send,Navigate';

  • Maxence Profile Picture
    55 on at

    It's work if you would like to print different layout (ex: 204 - 205 - 206)

    But If you have different layout 204 (Sales - Quote) ? It's it possible to let the choice to the user ?

    Can you tell me the difference between the layout  id 204 and id 1304?

  • Community Member Profile Picture
    on at

    how to Select Print Report  in business  central   BY [tag:mohammedhassan]

    https://youtu.be/hHAdwiuxF6E

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

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 715 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 452 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 371 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans