- 1. 用html 表格绘制报表,javascript导出EXCEL
- 2. 采用datagrid绑定报表数据,用后台方法导出
//Response.AppendHeader("Content-Disposition", "attachment;filename=dayReport" + flag + ".xls");
//Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.Clear();
Response.Buffer = true;
//Response.Buffer = true;
Response.AppendHeader("content-Disposition", "attachment;filename=" + DateTime.Now.ToString("yyyy-mm-dd") + ".xls");
//Response.AppendHeader("Content-Disposition","attachment;filename="+DateTime.
//Now.ToString("yyyyMMdd")+".xls");
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.ContentType = "application/ms-excel";
this.EnableViewState = false;
- 3. 采用Grid++Report提供的插件进行B/S报表的开发
- 4.采用asp.net内置的报表工具,Report向导。