RE: How to schedule reports on behalf of users?
hi
it is possible to send reports to a group of users at a scheduled interval in Business Central. One way to achieve this is by creating a custom codeunit that includes a function to generate and send reports to the specified group of users.
Here are the basic steps to achieve this:
Create a custom codeunit that includes a function to generate and send the report. The function should include parameters for the report ID, the recipients (e.g. a group of users), and the scheduling interval.
Within the function, you can use the REPORT.RUNMODAL function to generate the report, and the CODEUNIT.RUN function to send the report to the specified recipients.
In order to schedule the report to run at a specific interval, you can create a job queue entry and set the job queue event to trigger the custom codeunit.
Finally, you can configure the job queue to run at the desired interval, and specify the report ID and recipient group for each scheduled run.
This approach will allow you to automate the generation and distribution of reports to a group of users on a regular schedule, without requiring each individual user to schedule the reports themselves.
Daniele