Skip to Content
0
Former Member
Nov 17, 2010 at 01:18 PM

ReportDocument.SetDataSource - crdb_adoplus.dll

1246 Views

Hi

I hope someone can help me. I installed the latest runtime version for SAP Crystal Reports. (CRforVS_redist_install_32bit_13_0).

I have Crystal Report that needs to be distributed to mulitple machines each with a local SQL Express Database.

This mean I would need to specify the datasource for each Report in a config file.

But when I do the ReportDocument.SetDataSource I get the following error :

"Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified."

Sample Code :

try

{

dataClass dc = new dataClass();

string path = System.Reflection.Assembly.GetExecutingAssembly().Location;

path = path.Replace("TestApp.exe", "");

CrystalDecisions.CrystalReports.Engine.ReportDocument testRep = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

testRep.FileName = path + "testReport.rpt";

testRep.SetDatabaseLogon("", "", "PC
SQLEXPRESS", "testDB");

//This class returns a DataTable and this is where the above mentioned error occur.

//*****************

testRep.SetDataSource(dc.testReport());

//*****************

testRep.Load(testRep.FileName);

crystalReportsViewer1.ViewerCore.ReportSource = testRep;

}

catch (Exception EX)

{

MessageBox.Show("Report Error : " + EX.Message);

}

If someone could please tell me what I'm doing wrong or why I dont have a directory as mentioned in the error :

C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll'

Any help would be appreciated

Regards,

Gerhard.