This is a migrated thread and some comments may be shown as answers.

Reportviewer Auto Print Issue In IIS

0 Answers 56 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sonia
Top achievements
Rank 1
Sonia asked on 14 Dec 2012, 04:24 AM
Hi,
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.

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Sonia
Top achievements
Rank 1
Share this question
or