Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0 .NET4
I am creating crystal report from 2 tables in desktop application in vs 2010.i tried following code
on form load
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
"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 2-Apr-13 23:22pm
v3
Comments
ryanb31 at 3-Apr-13 7:36am
   
Does the file actually exist where the error says it is expecting it?
ThePhantomUpvoter at 3-Apr-13 7:38am
   
The error is pretty much self explanatory isn't it?
Tadit Dash at 3-Apr-13 8:16am
   
Check whether you have crdb_adoplus.dll in the bin folder of project ?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi Shivani,
 
Hope the below link will help you to solve your problem.
 
Crystel Report Error in VS2010[^]
 
Regards,
Manoj
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

in ur app.config write
 
<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>
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 515
1 Maciej Los 340
2 Richard MacCutchan 265
3 BillWoodruff 225
4 Mathew Soji 155
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 4 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100