Skip to Content

"This field name is not known." from ReportDocument.Load(), so how to VerifyDatabase?

Sep 21, 2017 at 11:42 PM


avatar image

I have a Crystal Report file that I'm unable to even load, using the following VB.NET code:

Dim objRptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument()

It throws a CrystalDecisions.Shared.CrystalReportsException

Message: Load report failed.
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)

With an InnerException of type System.Runtime.InteropServices.COMException

Message: This field name is not known.
Details: errorKind
Error in File my 17320_16748_{19E5E493-1D64-4084-8E97-6395D78D94EB}.rpt:
Error in formula SubTotal Label:
'If {Invoice.ForeignSubTotal} = {Invoice.ForeignTotalAmount} Then
This field name is not known.
Details: errorKind

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

Now I more or less know what the problem is... if I open the report in the Crystal Designer, do a Verify Database, and save it, it'll work fine. But I want to be able to do this automatically from my own code, rather than telling the user that they need to go run Verify Database on the report (especially since the user probably will not have access to the Crystal report designer). Normally, I'd call the ReportDocument.VerifyDatabase() method, but that assumes I already have the report loaded into the ReportDocument object. Since I can't even Load the report, I can't call VerifyDatabase.

Any advice on how I can accomplish this?

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

1 Answer

Don Williams
Sep 22, 2017 at 04:47 PM

What version of CR for VS are you using?

Later versions do not test the formula fields unless you specifically check them.


Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi, I'm using CR Developer for Visual Studio 13 SP21 (

I'll see if I can supply the .rpt file that demonstrates the problem.


Interesting.... So it would appear your only option is to specifically test for the Inner Exception and pop up a message box "The report requires Verifying the Database in CR Designer only, the CR SDK is not capable of doing this at runtime"

I've never seen this error before on open, it does suggest the report relies heavily on that field. Because the Engine loads all objects into memory and then validates them on open your only option is to fix the report first.

I would still like the report so I can pass it by R&D to see if we can improve things on Open....

Thanks again