How to interrupt Crystal report

I have an aspx params page where I fill in all the parameters that I later use to generate the report.
When the user clicks the "Show Report" button, I open another aspx page where I have a ReportDocument repDoc object to create the report. To make a report, I use the following code:

 repDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "Report Name");
repDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "Report Name"); 

Time-consuming reports appear, and some users prefer to close the page, but still the report is created on the server. How can I interrupt a report after I call the ExportToHttpResponse method to avoid rendering reports that no one will see / use?

+6
source share
1 answer

use Response.End() . He will cancel the answer.

0
source

Source: https://habr.com/ru/post/906117/


All Articles