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

Send Report pdf on Mail when Mentioned the Invoice No on report layout .

(0) ShareShare
ReportReport
Posted on by 208

Report-layout-rdlc.png

Here in this report when I insert invoice no and select preview option I want to send the report pdf directly to mail instead of viewing it. How can directly send report pdf to email from report layout after filtering on invoice no in Al code?

Please any ideas?

Thankyou 

  • Verified answer
    Mohana Yadav Profile Picture
    61,250 Super User 2026 Season 2 on at

    Why cant use Send action on the Posted Sales Invoice page?

    Or if you need in request page then check how the Send code is and change accordingly.

    PS: please provide a proper name/subject for the post instead of Business Central

  • NAV_with_Narang Profile Picture
    2,410 Moderator on at

    AS suggested by Mohana, please use the OOTB Send button available on most pages. Link for reference:

    learn.microsoft.com/.../ui-how-send-documents-email

    usedynamics.com/.../

  • Dividutt Profile Picture
    208 on at

    But I want to get only one sales order when I put the specific invoice no on report and filter only that details on mail how can we do that on al code,

    How Can I filter for one invoice number for sales invoice in report in code al

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    Maybe this post can be helpful for you.

    community.dynamics.com/.../filter-a-report-based-on-open-record

  • Dividutt Profile Picture
    208 on at

    Yes,this answers 50% of my query,

    but I have a rdl report made by other user, So I am uploading it in new layout and entering the invoice number it should run in background and print only that record of entered invoice number in attached pdf in mail

    ' I have not created any custom report'

    So this link u provided can be used  here also?'

    Please verify

    Thankyou

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    Yes, as long as you know the report number / report name you can change it to any report in the system.

    If it is a standard report you will have access to all of them. If it is a custom report made in another App you will need to define a dependency to that App in order to run the report from you AL code.

  • Verified answer
    Govinda Kumar Profile Picture
    2,310 Moderator on at

    Hi Dividutt,

    I'm glad to see that many helpful community members have already provided you with useful suggestions, I just wanted to add to the discussion here.

    Based on my understanding of your original post, it sounds like you want to send a report PDF to an email address instead of previewing it. You can do this by setting up the printer in the printer management settings with the 'Printer Email Address' your destination where you want to send the report.

    SMTP6.PNG

    SMTP81.png

    Then, when filtering the report, instead of selecting "Handled by browser" in the printer option

    SMTP82.png

    You can select your newly created printer, and click the printer

    SMTP83.png

    The report will automatically be sent to the specified email address in your printer.
    This way, you can avoid manually sending the report every time.

    Hope this helps!

    Best regards.

  • Suggested answer
    YUN ZHU Profile Picture
    103,672 Super User 2026 Season 2 on at

    Hi, Why not try the Email function directly?

    pastedimage1680479788232v1.png

    pastedimage1680479857415v2.png

    And you can add other default attachments, more details: https://yzhums.com/32793/

    Hope this helps as well.

    Thanks.

    ZHU

  • Dividutt Profile Picture
    208 on at

    Hi,

    I have a standard report, I am trying to filter one sales order with sales invoice number I am not getting that in my pdf attachment,I am getting all orders so how to filter that in my codeunit? Please can you help

  • Mohana Yadav Profile Picture
    61,250 Super User 2026 Season 2 on at

    Please share your codeunit code

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 753 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 583 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 302 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans