I have a button on my site that runs a SQL Server Report Services report. It takes some time to run and I wanted to show a processing indicator to my users. This was easy enough. This is in a form that runs the action in the controller.
<input
id="submitProcessingStandard"
type="submit"
class="btn btn-info"
value="PDF Report as of Date Below"
onclick="turnOn"
/>
This turns on the processing gif:
function turnOn() {
$("#processingStandard").show();
}
The action is very simple.
public IActionResult PDF(CustomCrimesAndDistricts ccd) {
return Redirect("http://xxxxxx/reportserver/Pages/ReportViewer.aspx?%2fDSP%2fDSP&rs:Format=PDF&enddate=" +
ccd.EndDate.ToString("MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture.DateTimeFormat));
}
Once the file has been downloaded, is there any way to re-hide the processing gif?
I was actually able to get around this in a different way. I do a synchronous download in the controller and then I can return to the view with whatever I need. Thank for looking. I think this is probably the best way to do it. Any other ways will always be considered. Thanks for looking.