Show ProgressBar when exporting RDLC Report to PDF in ASP.Net

Last Reply on Sep 02, 2015 09:12 AM By Mudassar

Posted on Sep 02, 2015 09:01 AM

Here's my chunk of code :

    public void ExportToPDF(string path, List<ReportParameter> reportParams, string fileName)
        Warning[] warnings;
        string[] streamIds;
        string mimeType = string.Empty;
        string encoding = string.Empty;
        string extension = string.Empty;

        // Setup the report viewer object and get the array of bytes
        var viewer = new ReportViewer();
        viewer.ProcessingMode = ProcessingMode.Remote;
        viewer.ServerReport.ReportServerUrl = new Uri("http://localhost/ReportServer");
        viewer.ServerReport.ReportPath = "/" + path;
        byte[] bytes = viewer.ServerReport.Render("PDF", null, out mimeType, out encoding, out extension,
            out streamIds, out warnings);

        // Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
        Response.Buffer = true;
        Response.ContentType = mimeType;
            "attachment; filename=" + fileName + "(" + DateTime.Now.ToShortDateString() + ")" + ".pdf");
        Response.BinaryWrite(bytes); // create the file
        Response.Flush(); // send it to the client to download


I have no update panel on this page , simply when i click on Export BTN i want to show the progress bar , this should be real not fake. I followed this article :

But that's fake , not real. 


I have hide report viewer , just exporting the report via provided code.


I want to show real progress bar until report is being rendered as PDF and when it is done that progress bar should get disappeared.

You are viewing reply posted by: Mudassar on Sep 02, 2015 09:12 AM.
Posted on Sep 02, 2015 09:12 AM

This is not possible. The only way suggested is present in the article.