This code use to work in VB , can't pinpoint what i'm missing here.
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);