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

Passing Default Report parameter for sending the email in Business central

(0) ShareShare
ReportReport
Posted on by 260

Dear members,

I would like to know how to pass the parameters for a default value while sending a email with attachment (Report) in business central. Currently, my email sending process gets failed when I am trying to send the email.

Please do suggest me the best way to pass the parameters for a default value.

Thanks in advance,

  • Suggested answer
    NAV_with_Narang Profile Picture
    2,410 Moderator on at

    There are a couple of ways you can do that, Passing values through functions, passing values through SETTABLEVIEW if these values are table fields or can also pass values through a XML Formatted string in the request page

    Scenario 1

    If your report filters are all table fields, suggest you to use the below in your code

    SETRANGE

    SETRANGE

    REPORT.SETTABLEVIEW

    REPORT.RUN

    Scenario 2

    If the report request page parameters are variables instead of table fields, Create a global function on the report you'd like to be attached as PDF in the Email. Make sure this function has all the request page global variables on the left side of the assignment and all your function parameters on the right side, much like:

    pastedimage1685015848966v1.png

    Now from the email batch report you have created, which attaches the above report as PDF, you can write the code as:

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

#2
YUN ZHU Profile Picture

YUN ZHU 483 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 310 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans