FastReports / FastReport

Free Open Source Reporting tool for .NET6/.NET Core/.NET Framework that helps your application generate document-like reports

Home Page:https://www.fast-report.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support cancellation tokens in FastReport.Prepare

MaximBalaganskiy opened this issue · comments

commented

Is your feature request related to a problem? Please describe.
Sometimes background report generation needs to be cancelled, for example, when SQL is slow.

Describe the solution you'd like
I would like to pass CancellationToken to FastReport.Prepare. It would be a non-breaking change if you default the parameter to CancellationToken.None.

Describe alternatives you've considered
I see that there's an Abort method but the docs don't have any examples on how to properly use it or if it's thread safe.
I suspect that Abort only cancels the report generation but not the DB query.

commented

Hello, what about PrepareAsync? It has a CancellationToken in params

commented

This method is in the sources but not in the nuget package.

commented

@Alekarfes could you please add a link to the commit which resolves this?