水晶报表。但是要花钱的。作为程序员,咱要尊重版权
我的意见是,提供给客户下载Excel文件。让客户自己去打印。

解决方案 »

  1.   

    <div>
            <object classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" id="WebBrowser" width="0"></object> 
            <input name="Button" onclick="document.all.WebBrowser.ExecWB(7,1);document.getElementById('btnPrint').click();" class="Noprint" type="button" value="打印并预览" id="Button1" />
            <div style ="display:none;"><asp:Button ID="btnPrint" runat="server" Text="Button" OnClick="btnPrint_Click" CssClass="btn" /></div>
            <asp:HiddenField ID="HFPrint" runat="server" />
            <input name="Button" onclick="javascript:window.opener=null;window.close();" class="Noprint" type="button" value="关闭" />
            <div id="viewContent" style="width:600px;" runat="server">
            <br />
            </div>
        </div>