Этот код используется для работы в 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);