Symptom
- A Crystal Reports .NET web application fails on the server with "Load Report Failed" error message.
- Stack trace:
CrystalDecisions.Shared.CrystalReportsException:
Load report failed -->
System.Runtime.InteropServices.COMException(0x8000020D): Unable to load report at
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object&DocumentPath, Int32 Options)
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object&DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
-------- End of inner exception stack trace --------
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod,
Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) at PrintReports.OpenReport
(String sReport, ReportDocument rpt, String sForm, Boolean bPrint) at PrintReports.btnEnter_Click(sender, EventArgs e)
Environment
Development Environment :
- Visual Studio 2005 / Visual Studio 2008
- Crystal Reports 2008
Production / Server Environment :
- IIS 6.0 / IIS 7.5
- .NET framework 2.0 / 3.5
Cause
While publishing the web application, with Crystal reports (.rpt files), to destination, from Visual Studio IDE, the following options were not checked.
- Allow this precompiled site to be updatable.
- Use fixed naming and single page assemblies.
Due to this the Crystal reports in server machine were reduced to 1kb size rather than the actual size.
Resolution
- Compile the web application in Visual Studio 2005 / Visual Studio 2008.
- On completion of the build as success, go to Build -> Publish Web Site.
- In Publish Web Site window, set the target location.
- Check the Allow this precompiled site to be updatable checkbox (by default it is unchecked).
- Check the Use fixed naming and single page assemblies checkbox (by default it is unchecked).
- Click OK to proceed ahead and publish the web application.
Make sure that the Crystal reports in server machine are of the same size as the one in development machine, to ensure.
Keywords
DotNet, VS2005, CR2008, Deploy, publish , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem
Product
Crystal Reports 2008 V0