asp.net中输出水晶报表的实例
2004-09-05 09:57
525 查看
asp.net中将水晶报表直接输出提供下载。
………………………………
Case "PDF"
exp.ExportFormatType = ExportFormatType.PortableDocFormat
exp.FormatOptions = New PdfRtfWordFormatOptions()
filename = "pdf"
…………………………………
Dim req As New ExportRequestContext()
req.ExportInfo = exp
Dim st As System.IO.Stream
st = rdRpt_1.FormatEngine.ExportToStream(req)
Page.Response.ClearHeaders()
Page.Response.ClearContent()
Page.Response.ContentType = "application/x-msdownload"
Page.Response.AddHeader("Content-Disposition", "attachment;filename= " & filename)
Dim b(Convert.ToInt32(st.Length)) As Byte
st.Read(b, 0, Convert.ToInt32(st.Length))
Page.Response.BinaryWrite(b)
Page.Response.End()
st.Close()
………………………………
Case "PDF"
exp.ExportFormatType = ExportFormatType.PortableDocFormat
exp.FormatOptions = New PdfRtfWordFormatOptions()
filename = "pdf"
…………………………………
Dim req As New ExportRequestContext()
req.ExportInfo = exp
Dim st As System.IO.Stream
st = rdRpt_1.FormatEngine.ExportToStream(req)
Page.Response.ClearHeaders()
Page.Response.ClearContent()
Page.Response.ContentType = "application/x-msdownload"
Page.Response.AddHeader("Content-Disposition", "attachment;filename= " & filename)
Dim b(Convert.ToInt32(st.Length)) As Byte
st.Read(b, 0, Convert.ToInt32(st.Length))
Page.Response.BinaryWrite(b)
Page.Response.End()
st.Close()
相关文章推荐
- 水晶报表asp.net的webform下基本用法实例
- ASP.NET中水晶报表的使用实例
- 水晶报表asp.net的webform下基本用法实例
- ASP.NET中水晶报表的使用实例
- Asp.Net中使用水晶报表(下)
- ASP.net 2.0中水晶报表迁移部署问题
- asp.net水晶报表初体验
- Asp.Net中使用水晶报表
- asp.net 水晶报表--主从表关联问题
- asp.net 水晶报表--主从表关联问题
- ASP.NET里实现水晶报表的打印
- asp.net输出重写压缩页面文件实例
- ASP.NET MVC 5使用CrystalReport(水晶报表)
- [水晶报表小技巧-开发-3]ASP.Net中使用水晶报表10的打印功能
- ASP.NET中常用输出JS脚本的类实例
- ASP.NET中常用输出JS脚本的类实例
- 浅谈水晶报表在ASP.NET中的一种灵活应用
- ASP.NET中水晶报表的使用
- asp.net水晶报表参数字段在代码中赋值的方法
- Asp.Net中使用水晶报表(下)