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

Get report parameters without displaying RunRequestpage to User

(0) ShareShare
ReportReport
Posted on by 666

Hi all, 
I have a scenario where I need to send a custom report as an attachment to numerous customers via email.

Is there a way to get the report parameter using only the SetTableView() procedure without showing the RunRequestpage to the user and let the user press OK.
I want to run this as a job Queue. 

Many thanks

  • Suggested answer
    YUN ZHU Profile Picture
    103,813 Super User 2026 Season 2 on at
  • Avinash B Profile Picture
    1,455 on at

    Hi Hein,

    Did you figure out any solution?

    I have a similar scenario  where I want to filter record before I call Report.RunRequestPage() and pass it to request page.

    How can I generate report request parameters through code and pass it to RunRequestPage function?

    Thanks,

  • Hein Kruger Profile Picture
    666 on at

    Hi Avinash,

    This is my solution.

    I used this link to get the Report Parameter

    docs.microsoft.com/.../reportinstance-runrequestpage-method

    The out put will be something like this

     '<?xml version="1.0" standalone="yes"?><ReportParameters name="Order Email" id="50118"><Options><Field name="NoOfCopies">0</Field><Field name="ShowInternalInfo">false</Field><Field name="LogInteraction">true</Field><Field name="ShowCorrectionLines">false</Field><Field name="ShowLotSN">false</Field><Field name="DisplayAssemblyInformation">false</Field></Options><DataItems><DataItem name="Incoming Order ">VERSION(1) SORTING(Field3,Field1) WHERE(Field43=1(%1),Field120=1(0))</DataItem><DataItem name="CopyLoop">VERSION(1) SORTING(Field1)</DataItem><DataItem name="PageLoop">VERSION(1) SORTING(Field1)</DataItem><DataItem name="DimensionLoop1">VERSION(1) SORTING(Field1)</DataItem><DataItem name="Incoming Order Line">VERSION(1) SORTING(Field3,Field4)</DataItem><DataItem name="DimensionLoop2">VERSION(1) SORTING(Field1)</DataItem><DataItem name="DisplayAsmInfo">VERSION(1) SORTING(Field1)</DataItem><DataItem name="Total">VERSION(1) SORTING(Field1)</DataItem><DataItem name="Total2">VERSION(1) SORTING(Field1)</DataItem><DataItem name="ItemTrackingLine">VERSION(1) SORTING(Field1)</DataItem><DataItem name="TotalItemTracking">VERSION(1) SORTING(Field1)</DataItem></DataItems></ReportParameters>';

    I added the Parameter as a Label to my code unit and replaced the filters that I want to use with StrSubstNo and passed that through as the parameter.  (Not the best method, but it does work.)

    Here is another reply I got from another forum.

    www.dynamicsuser.net/.../76232

    Hope it helps

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

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 768 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 541 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 324 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans