Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Event OnAfterDocumentPrintReady is not raised during printing in BC18

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone
I'm trying to subscribe to the OnAfterDocumentPrintReady event to define what happens when a user chooses to print a report.
The problem is that this event, in BC18, seems not to be raised. Even using the "Event Recorder" I can't find it in the list.

Event Recorder BC18

EventRecorderBC18.PNG

I think that the problem is not related to my code, because in BC16 everything works fine. Do you know why it happens?

Event Recorder BC16

EventRecorderBC16.PNG

My goal is to get the InputStream of the pdf report when a user presses the "print" button on the request page,
do you know if there is any other similar event I can subscribe to?

Thank you.

  • Suggested answer
    RE: Event OnAfterDocumentPrintReady is not raised during printing in BC18

    Hello,

    This was changed in BC17 and is kind of documented here: The trigger only runs from an extension printer:

    Printing Reports - Business Central | Microsoft Docs

    pastedimage1660559009333v1.png

    So from BC17 the trigger is not used for browser prints or Windows server print jobs. It was a bug in early 16 versions that it could be called for other setups, which actually caused a high number of session crashes.

    Sorry if this is not helpful to you, but I hope it at least clarifies what you see and that you have other triggers / events that you can use.

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans