2.3. Cancelling Reports
If the report execution is running as a background task, it can be interrupted by the user.
To add the cancel option, set the
reporting.useBackgroundReportProcessing property in the Administration > Application Properties screen.
reporting.useBackgroundReportProcessing = true
Thus, the window with the progress bar and the Cancel button will be displayed:
You can also set the processing timeout using the
reporting.backgroundReportProcessingTimeoutMs = 30000
When the time is up, the task will be canceled regardless the result, and the user will receive an error message:
To cancel the report execution programmatically, you can use the
cancelReportExecution() method of the
ReportService interface that takes the identifiers of the user session and the report: