SAP Knowledge Base Article - Public

1245654 - A Crystal Reports .NET web application deployed using the Visual Studio 'Publish' option, throws "Load Report Failed" error

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

  1. Compile the web application in Visual Studio 2005 / Visual Studio 2008.
  2. On completion of the build as success, go to Build -> Publish Web Site.
  3. In Publish Web Site window, set the target location.
  4. Check the Allow this precompiled site to be updatable checkbox (by default it is unchecked).
  5. Check the Use fixed naming and single page assemblies checkbox (by default it is unchecked).
  6. Click OK to proceed ahead and publish the web application.

          Publishing Option.JPG 

    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