I'm trying to export the pdf files from Crystal to streams, then I want to add them (7 total) to a zip file using the DotNetZip Library. I'm just trying to add one below. I have a feeling I'm way off. Please help.
MemoryStream oStream;
CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
if (a2batch.Count > 0) // a2batch - My Crystal Datasource List
{
rpt.Load(Server.MapPath("~\\Report\\Construction\\ScheduleA2.rpt"));
rpt.SetDataSource(a2batch);
oStream = (MemoryStream)rpt.ExportToStream(ExportFormatType.PortableDocFormat);
using (ZipFile zipFile = new ZipFile())
{
zipFile.AddEntry("Report.pdf", oStream);
zipFile.Save("Report.zip");
}
}