回复 4楼zhongren66zr的帖子
web 导出Section 成pdf 已经解决,
System.IO.MemoryStream m_stream = new System.IO.MemoryStream();
SectionReport1 rpt = new SectionReport1();
rpt.Run();
GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport pdfExport1 =
new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport();
if (pdfExport1 == null)
{
pdfExport1 = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport();
}
pdfExport1.Export(rpt.Document, m_stream);
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "inline;filename=MyExport.pdf");
Response.BinaryWrite(m_stream.ToArray());
Response.End();
这种实现的效果是先把pdf在WEB页面中显示,然后再点击pdf上边自带的保存按钮,如何能直接实现 点击导出弹出保存到某个位置的 那种功能呢? |