Skip to Content

CrystalDecisions.Shared.CrystalReportsException

Hello,

I'm getting the following error, does anyone have any insight on how to resolve it?

Sometimes when iterating over ReportDocument.DataDefinition.FormulaFields will cause this error:

CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: The document has already been opened or created.

at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)

at 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.ReportAppServer.ReportClientDocumentWrapper.get_DataDefinition()

at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_DataDefinition()

Also

Sometimes when setting a FormulaFieldDefinition from ReportDocument.DataDefinition.FormulaFields will cause this error:

CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: The document has already been opened or created.

at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)

at 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.ReportAppServer.ReportClientDocumentWrapper.get_DataDefController()

at CrystalDecisions.CrystalReports.Engine.FormulaFieldDefinition.set_Text(String value)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 07 at 10:38 PM

    What CR for VS SP are you using?

    Are you closing and disposing of each report once you are done with it?

    Try SP 22:

    https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

    Don

    Add comment
    10|10000 characters needed characters exceeded