Click here to Skip to main content
15,894,042 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am creating crystal report from 2 tables in desktop application in vs 2010.i tried following code
on form load
C#
DataSet ds = new DataSet();
string strSQL = "SELECT Department.Department, Employees.Name, Employees.State FROM Department INNER JOIN Employees ON Department.DepartmentID = 1";

SqlConnection con=new SqlConnection("Data Source");

SqlDataAdapter da = new SqlDataAdapter(strSQL,con);

da.Fill(ds, "DataTable1");
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(@"path\CrystalReport1.rpt");
cryRpt.SetDataSource(ds);
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();


I am getting following error
C#
"Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified."


any help will be appreciable
regards
Posted
v3
Comments
ZurdoDev 3-Apr-13 7:36am    
Does the file actually exist where the error says it is expecting it?
[no name] 3-Apr-13 7:38am    
The error is pretty much self explanatory isn't it?
Check whether you have crdb_adoplus.dll in the bin folder of project ?

Hi Shivani,

Hope the below link will help you to solve your problem.

Crystel Report Error in VS2010[^]

Regards,
Manoj
 
Share this answer
 
in ur app.config write

C#
<pre lang="xml"><startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900