Symptom
Clicking on any of the page navigation, report opens a random a page.
Environment
- Crystal Reports 2008
- Visual Studio 2008
- Web Application
- Windows XP
Cause
- ReportDocument.Load() creates a temp copy and uses it to load the report into memory.
- If report is not stored somewhere the data is gone on postback resulting in the wrong behavior.
Resolution
- Store the ReportDocument object in session as given below:
If(Session["Report"]==null) { boReportDocument = new ReportDocument();
boReportDocument.Load("reportname.rpt");
Session.Add("Report", boReportDocument); } CrystalReportViewer.ReportSource = Session["Report"];
Keywords
KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem
Product
Crystal Reports 2008 V1