This is a migrated thread and some comments may be shown as answers.

Cancel Report Generation

1 Answer 148 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 11 Jan 2018, 01:58 PM

Is there anyway to cancel a report being generated with RenderReport?  For example, we are creating a PDF of a report that takes some time to finish.  Is there any asynchronous ways of creating the report such that we can cancel its execution? 

 

I saw a post on here a few years ago that it couldn't be canceled, but I'm hoping something has been done since then to change this.  Thanks for any guidance.

Example:

ReportProcessor reportProcessor = new ReportProcessor();                      

ReportLibrary.TestReport report = new ReportLibrary.TestReport();                                               InstanceReportSource reportSource = new InstanceReportSource();                         

reportSource.ReportDocument = report;                         

RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, null);

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 16 Jan 2018, 10:28 AM
Hi Paul,

Currently, the generation of a report cannot be cancelled.

A possible workaround is to run the ReportProcessor in a separate thread, and kill the thread based on some custom condition (i.e. after some time).

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or