Skip to Content
avatar image
Former Member

Crytal Report for Visual Studio 2015 on Windows 10 64 Bit

I have Visual Studio 2015 professional version. I have downloaded and installed Crystal report 13.0.19.2312

When I run my ASP.NET application and try to view report it gives me below error.

Unable to cast object of type 'FileStreamDeleteOnClose' to type 'System.IO.MemoryStream

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 26 at 02:38 PM

    Use Google and search for this KBA:

    2105311 - ExportToStream throws exception in SP 12 in Crystal Reports for Visual Studio

    Not supported, use

    System.IO.Stream stream = reportDocument.ExportToStream (CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • May 18, 2017 at 08:18 PM

    Use Fiddler and/or ProcessMonitor and or Hit F12 in Browsers and see what is generating the error.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 19, 2017 at 01:12 PM

    Dim report As CrystalDecisions.CrystalReports.Engine.ReportDocument

    Dim oStream As System.IO.MemoryStream

    report = New CrystalDecisions.CrystalReports.Engine.ReportDocument()

    report.FileName = "MyReport.rpt"

    report.SetDataSource(TableData)

    report.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperLetter

    oStream = report.ExportToStream (CrystalDecisions.Shared.ExportFormatType.WordForWindows)

    Above line generates error. This line works fine on visual studio 2013 and windows 7 pc.

    Add comment
    10|10000 characters needed characters exceeded