请参考http://blog.csdn.net/cao_david/archive/2007/06/08/1643632.aspx

解决方案 »

  1.   

    <script>window.print()</script>
      

  2.   

    dhtml打印——html中添加:
    <OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT>
    <input type=button value=打开     onclick=document.all.WebBrowser.ExecWB(1,1)/>
    <input type=button value=另存为   onclick=document.all.WebBrowser.ExecWB(4,1)/>
    <input type=button value=全选     onclick=document.all.WebBrowser.ExecWB(17,1)/>
    <input type=button value=属性     onclick=document.all.WebBrowser.ExecWB(10,1)/>
    <input type=button value=关闭窗口 onclick=document.all.WebBrowser.ExecWB(45,1)/>
    <input type=button value=打印     onclick=document.all.WebBrowser.ExecWB(6,1)/>
    <input type=button value=直接打印 onclick=document.all.WebBrowser.ExecWB(6,6)/>
    <input type=button value=页面设置 onclick=document.all.WebBrowser.ExecWB(8,1)/>
    <input type=button value=打印预览 onclick=document.all.WebBrowser.ExecWB(7,1)/>
      

  3.   

    http://www.webprintx.cn/
    WebPirntX用ActiveX方式直接控制打印机,设置页眉,页脚,页边距,纸张大小,纸张走向,不降低IE当前安全选项等等的所有问题
      

  4.   


      
    报表打印控件wsReport4.6