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

Print another report from the Request Page

(0) ShareShare
ReportReport
Posted on by

Hello guys,

I would like to do the following in BC 14:

I have a report 116. In this report there is a request page. There I have added a variable as an option. This is called "PrintOnPaper".

If this option is then checked by the user, that means it is set to the value true, not the report 116 should be printed, but the report 50116.

This is a modified copy of 116.

How can I make this possible?

In the OnitReport-trigger I tried this:

IF PrintOnPaper = TRUE THEN
  REPORT.RUNModal(50116,FALSE,False,"Issued Reminder Header");
CurrReport.SKIP;

I have the same question (0)
  • Suggested answer
    Vaishnavi J Profile Picture
    3,062 on at

    Hi,

    Set the option values for PrintOnPaper field like the below screenshot.

    pastedimage1645115363549v3.png

    You can add the below logic in the OnPreReport trigger to run the customized report when the field value is yes.

    pastedimage1645115197312v2.png

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much.

  • Community Member Profile Picture
    on at

    Thank you very much for your help.

    This already works quite well.

    Only I still have the following problem.

    When I start the report and enter my filter parameters and check the PrintOnPaper field and go to Preview, the request page of the other report opens. This is also correct.

    But here I have to enter again all the filters that I have already entered in Report 116.

    Is there a way to save the filters and pass them to the Request Page 50116?

    Thanks a lot :)

  • Community Member Profile Picture
    on at

    This is my current code:

    IssuedReminderHeaderPrint := "Issued Reminder Header".GETFILTERS;

    IF PrintOnPaper = TRUE THEN BEGIN

     "Reminder OnPaper".RUN;

     CurrReport.QUIT;

    END;

    IF I use the parameters of the Run function or RunModal function the programm always tries to save the report to the disk...so I have changed the code a bit.

  • Suggested answer
    Vaishnavi J Profile Picture
    3,062 on at

    Hi,

    You don't need to use Report variable and then use Run function

    "Reminder OnPaper".RUN; // this is not required.

    Instead of this use Report.RunModal(Report Id, False, False , Record). Refer the below screenshot.

    pastedimage1645199504678v1.png

    The request page would not run for another report and the data will be pulled based on request page values that you have added before.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much.

  • Community Member Profile Picture
    on at

    Ok, if I take your code and run the report 116 (in preview mode).

    Now always opens a window that asks me to save the report.

    If I then enter a file name here, the correct report 50116 is saved on the desktop.

    But I didn't want to save the report, I just wanted to view it in preview mode.

    Why does this no longer work?

    If I then simply call the 50116 report with Run, the preview mode works and I am not prompted to save.

  • Suggested answer
    Vaishnavi J Profile Picture
    3,062 on at

    Can you send me the code that you have written on both reports?

  • Community Member Profile Picture
    on at

    I could solve it, with that code change:

    REPORT.RUNModal(50116,True,False,"Issued Reminder Header");

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 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans