Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

RDLC Report View Actions

Posted on by 35

Hello,

Am looking for a way to detect selection of the print action on the report view and do some work in c/al code.

RepH.PNG

*This post is locked for comments

  • Junnav Profile Picture
    Junnav 35 on at
    RE: RDLC Report View Actions

    Stefano,

    If the user clicks print there's no chance to see report content as it is sent directly to printer. I instead want to first generate report, inspect then print(using print icon on the report action)

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: RDLC Report View Actions

    No. This post the journals only when the user clicks PRINT. If he click PREVIEW, you're in the first block.

  • Junnav Profile Picture
    Junnav 35 on at
    RE: RDLC Report View Actions

    This posts the journal before user inspects report.

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: RDLC Report View Actions

    You can do like:

    IF CurrReport.PREVIEW THEN

     //here your user is previewing the report

    ELSE

    BEGIN

     //here your user is printing the report

     //Post the Journal Lines

    END;

  • Junnav Profile Picture
    Junnav 35 on at
    RE: RDLC Report View Actions

    I have a report that's generated by a user, confirms that the report is okay then prints. I need to post some journal lines when user clicks on print.

    Note: User may review the report severally before printing

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: RDLC Report View Actions

    What's your exact need??

  • Junnav Profile Picture
    Junnav 35 on at
    RE: RDLC Report View Actions

    Hi Stefano,

    Mine is a custom report and am not sure how to use CU 229 with such.

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: RDLC Report View Actions

    You can't detect the click of that button.

    You can detect if a report in in preview mode:

    IF CurrReport.PREVIEW THEN ...

    or you can detect if it's printed. When printed, the codeunit 229  - "Document-Print" is called.

    In the PrintSalesOrder() trigger you can write your code.

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

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans