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.
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.