Tuesday, March 27, 2012

Failed to load database information

I have Crystal Report 9 installed. I created rpt in VS2003 and set database as a dataset. Also, I developed a VS2003 dll to print report.

When I called the dll in VS2005, always got the error as the title: Failed to load database information. Even I made up datasource in dll, no luck. So there must be something wrong while calling 2003 dll from vs2005.

Any idea?

If I add CrystalDecisions.CrystalReport.Engine and CrystalDecisions.Shared in vs2005 project as reference, but the version is 9.2.3300.0. I add some codes to print report:

ReportDocument rpt = new ReportDocument();
rpt.Load(@."D:\VS 2005 Projects\CallPrintCrystalReport\CallPrintCrystalReport\CrystalReport1.rpt");
rpt.SetDataSource(CreateDS());
rpt.PrintToPrinter(1, false, 0, 0);
rpt.Close();

Same error!!! Does this mean CrystalReport 9.2.3300 can not be called by VS2005?Probably not, since CR of VS2005 is based-on version XI.|||Thank you. I just wanna make sure about it.sql

No comments:

Post a Comment