I am trying to print programmatically with RSClientPrint. I used the code behow. When I load the page a print dialog pops up. After I select a printer and click "Print" a message shows "Printing now" and stays there forever, it just hangs
there and forget about me. I change my appPool to use administrator account and turned off all firewalls. The testing report is just a report with one textbox in it. It doesn't connect to any database. Any idea how to resolve this would be greatly appreciated.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test2.aspx.cs" Inherits="ReportWeb.Test2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body onload="Print()">
<OBJECT ID="RSClientPrint"
CLASSID="CLSID:5554DCB0-700B-498D-9B58-4E40E5814405" CODEBASE="http://RSClientPrint.cab" ></OBJECT>
<script
language="javascript">
function Print() {
if (typeof RSClientPrint.Print == "undefined") {
alert("Unable to load client print control.");
return;
}
RSClientPrint.MarginLeft = 12.7;
RSClientPrint.MarginTop = 12.7;
RSClientPrint.MarginRight = 12.7;
RSClientPrint.MarginBottom = 12.7;
RSClientPrint.Culture = 1033;
RSClientPrint.UICulture = 9;
RSClientPrint.UseEmfPlus = true;
RSClientPrint.Print('http://localhost/reportserver', '/RP/Simple', 'Report Name')
alert('complete');
}
setTimeout('PrintReport()', 1);
</script> <form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>