Skip to Content
0

CrystalDecisions.Shared.CrystalReportsException

Mar 06 at 11:15 PM

76

avatar image

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)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Don Williams
Mar 07 at 10:38 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded