Reportviewer Auto Print Issue In IIS

1 posts, 0 answers
  1. Sonia
    Sonia avatar
    1 posts
    Member since:
    Dec 2012

    Posted 13 Dec 2012 Link to this post

    I have a aspx page with telerik Reportviewer. I want to auto print the Reportviewer when filter button in my page is clicked.
    I have used the following code on filter button's click event.

       protected void filter_Click(object sender, EventArgs e)
            var printScript = "";
            printScript += "ReportViewer.OnReportLoadedOld = ReportViewer.OnReportLoaded;";
            printScript += "ReportViewer.prototype.OnReportLoaded = function()";
            printScript += "{";
            printScript += "this.OnReportLoadedOld();";
            printScript += ReportViewer1.ClientID + ".PrintReport();";
            printScript += "}";

            ScriptManager.RegisterStartupScript(this, GetType(), "ReportPrint", printScript, true);

    This code is working fine on localhost but it is not working on web server.
    Please let me know what is going wrong.
Back to Top