With the last version of Crystal Report for visual studio SP12, all our reports stop to work launching the same exception "Unable to cast object of type 'FileStreamDeleteOnClose' to type 'System.IO.MemoryStream'."
This occurs since We have upgrade to last available version as I told SP12, it happens in all our development computers (Windows 7 Professional 64 bits), and at satge server (Windows Server 2012 - 64 bits), production server is running for now SP10 and the reports works perfectly, it seems something related with SP12 version.
Following KBA-1198587 to export reports our sample code that is producing this error is tge bext:
public System.IO.MemoryStream GenerarReport(MyObject _object)
Reports.TestReport reportDocument = new Reports.TestReport();
System.IO.MemoryStream reportDomentMemoryStream = (System.IO.MemoryStream)reportDocument.ExportToStream(ExportFormatType.PortableDocFormat);
We are developing in .Net 4.5.2