HIkakuHyo rpt = new HIkakuHyo();
rpt.UnboundDataSource = newDataTable;
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment; filename=" + HttpUtility.UrlEncode(fe_MakeFileName(newDataTable, ChouhyouType) + ".pdf", System.Text.Encoding.UTF8));
GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport pdf = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport();
System.IO.MemoryStream memStream = new System.IO.MemoryStream();
pdf.Export(rpt.Document, memStream);
Response.BinaryWrite(memStream.ToArray());
Response.Flush();
Response.Close(); |