Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

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

Posted on by 200

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 

  • Mohana Yadav Profile Picture
    Mohana Yadav 59,125 Super User 2024 Season 2 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Please share your codeunit code

  • Dividutt Profile Picture
    Dividutt 200 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    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

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,296 Super User 2024 Season 2 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    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

  • Verified answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    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
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    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.

  • Dividutt Profile Picture
    Dividutt 200 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    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
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Maybe this post can be helpful for you.

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

  • Dividutt Profile Picture
    Dividutt 200 on at
    RE: Business Central

    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

  • NAV_with_Narang Profile Picture
    NAV_with_Narang 2,234 Super User 2024 Season 1 on at
    RE: Business Central

    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/.../

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,125 Super User 2024 Season 2 on at
    RE: Business Central

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans