cancel
Showing results for 
Search instead for 
Did you mean: 

Btrieve Native Connection and Crystal 2008 .NET SDK Error Table Not Found

Former Member
0 Kudos
54

I have a report using a native Btrieve connection (PSQL version 10 summit) which works fine. However when I automate it with the following code


      ReportDocument reportDoc = new ReportDocument(); 
      reportDoc.Load("C:\\CReports\\demodata_direct.rpt", OpenReportMethod.OpenReportByTempCopy);
      reportDoc.Refresh();
//      reportDoc.VerifyDatabase();
      reportDoc.PrintToPrinter(1,false,1,1); 

I get the exception message

Error in File demodata_direct {785C262E-1F71-431C-9A29-53349641C461}.rpt:

The table could not be found.

If I uncomment the VerifyDatabase line I get an empty report (No headings even)

I'm new to the SDK and I guess I'm doing (or not doing) something obvious.

Any takers?

TIA

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Trevor,

The error (table not found) suggests that the database doesn't match what the report is expecting.

Are you logging onto your database at runtime? I don't see any logon code in your post. Is the database password protected? If so, then you'd need to pass logon credentials at runtime.

At runtime is the report trying to hit the database it was designed against? Or are you trying to connect to a different database?

What version of Visual Studios are you using? What version of Crystal Reports are you using?

Sincerely,

Dan Kelleher

Answers (2)

Answers (2)

Former Member
0 Kudos

This is a fault in Crystal reports! The installation does not copy sbtrvd32.dll to the correct location, it needs to be in the Windows\System32 folder but the installation copies it to the win32_x86 folder.

Support tell me that this is due to be fixed in SP2 scheduled for end of July 2009. In the meantime, moving or copying the dll to the correct location fixes the problem.

Former Member
0 Kudos

Thanks for your input.

The database is not password protected and I am making no changes to the database connection at run time. If I open the report with crystal 2008 it works fine without prompting me for any extra data. If I change the connection to ODBC it works fine in the SDK. It seems the problem only occurs because it is a native connection.

I am using Visual studio 2005, Crystal reports 2008 SP1 (12.1.0.892).

Regards

0 Kudos

Hi Trevor,

Simply set the logon info in code then verify will work:

//Pervasive

rptClientDoc.DatabaseController.LogonEx("DEMODATA", "billing", "", "");

Thank you

Don