此代码用于在 VB 中工作,无法确定我在这里缺少什么。
System.IO.MemoryStream oStream = new System.IO.MemoryStream();
if (rptName == "rpt_BankFormatExCopy.rpt" | rptName == "GIS_reportExFormat.rpt" | rptName == "GPFDeductionRepExFormat.rpt")
oStream = rptObject.ExportToStream(CrystalDecisions.Shared.ExportFormatType.ExcelRecord);
else
oStream = rptObject.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Excel);