http://ms.mblogger.cn/wayneliu
http://expert.csdn.net/expert/faq/faq_index.asp?id=3494
相信会对楼主有帮助。

解决方案 »

  1.   

    DataGrid显示的数据打印
    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=3494
      

  2.   

    How to Print a DataGrid in C# and .NET
    http://www.c-sharpcorner.com/Graphics/DataGridPrinterMG.asp
      

  3.   

    //将HTTP头添加到输出流
    HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=word.doc"); //指定生成文件的类型
    Response.ContentType = "application/vnd.ms-text";  
    HttpContext.Current.Response.Charset = "";
    HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default;
    this.Datagrid2.Page.EnableViewState = true; System.IO.StringWriter tw= new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw= new System.Web.UI.HtmlTextWriter(tw);
    this.DataGrid1.Visible = true;

    //将服务器控件中的内容输出到System.Web.UI.HtmlTextWriter对象中
    this.DataGrid1.RenderControl(hw);

    HttpContext.Current.Response.Write(tw.ToString());
    HttpContext.Current.Response.End();
      

  4.   

    使用这个开源免费的打印
    http://community.csdn.net/Expert/topic/3278/3278050.xml?temp=.5012934