on 2008 Dec 16 2:46 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.