Hi, Im trying to pass a Crystal Report Document type object to another page through Session but it sending a null error message. The goal is to generate the report in PDF format which is already taken care by custom class helper Rpt2PDF. The helper works perfectly and tested working if the report will be viewed in the same page.
Report Builder
Report ViewerCode:oRpt.SetDataSource(myDS) Session("vwreport") = oRpt ClientScript.RegisterStartupScript(Me.Page.GetType(), "", "window.open('vwreport.aspx' );", True)
ErrorCode:r = CType(Session("vwreport"), ReportDocument) Try _page_helper.Rpt2PDF(r) Catch ex As Exception Response.Write("<h2>Unable to load report. Please try again.</h2>") Response.Write(ex.ToString) End Try
Appreciate any help. Thanks in advance.Code:nable to load report. Please try again. System.NullReferenceException: Object reference not set to an instance of an object. at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_IsLoaded() at



Reply With Quote