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.
*This post is locked for comments
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.
*This post is locked for comments
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)
No. This post the journals only when the user clicks PRINT. If he click PREVIEW, you're in the first block.
This posts the journal before user inspects report.
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;
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
What's your exact need??
Hi Stefano,
Mine is a custom report and am not sure how to use CU 229 with such.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156