locked
printing with RSClientPrint hangs RRS feed

  • Question

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

    Saturday, June 19, 2010 7:02 AM

Answers

  • There was something wrong with my server web.config. Using another server it works now.
    • Marked as answer by awu255 Sunday, June 20, 2010 3:03 PM
    Saturday, June 19, 2010 3:36 PM