The application lets the user bring up time sheets by job number in a grid and be able to select and show the report. There is a page scroll function to scrool thru pages and also a print button that lets you open the report in .pdf and print. For most part is it working but once in a while it does not let us scroll nor print. Below is the code for the print, it errors on the "oStream" line... We are using reference to CrystalDecsisions 11.5.3700.0.
I canno figure out what causes this to happen. Than you.
Code (vs2008)
myCrystalReport1 = Session("myCrystalReport1")
Dim oStream As New MemoryStream
oStream = myCrystalReport1.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Response.BinaryWrite(oStream.ToArray())
Response.End()
Error:
CrystalDecisions.CrystalReports.Engine.InternalException was unhandled by user code
Message="The Report Application Server failed"
Source="CrystalDecisions.ReportAppServer.DataSetConversion"
StackTrace:
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)
at _Default.Page_Load(Object sender, EventArgs e) in C:\Users\vgwprja\Documents\Visual Studio 2008\WebSites\ProjectDailyReport\Show_Pdf.aspx.vb:line 23
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: System.Runtime.InteropServices.COMException
ErrorCode=-2147482651
Message="The Report Application Server failed"
Source=""
StackTrace:
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
InnerException: