web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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 629

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

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,748 Super User 2025 Season 2 on at

    Hi, How about using the Report.RunRequestPage([Text]) method?

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/reportinstance-runrequestpage-method

    Here are a few examples:

    https://yzhums.com/7200/

    https://yzhums.com/20030/

    Hope this will help.

    Thanks.

    ZHU

  • 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
    629 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,066

#2
YUN ZHU Profile Picture

YUN ZHU 658 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 595

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans