Click here to Skip to main content
15,848,758 members
Please Sign up or sign in to vote.
3.00/5 (8 votes)
See more:
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. how can solve this error in windows application
Posted
Updated 22-Dec-20 22:12pm
Comments
[no name] 4-Aug-13 9:33am    
Is crystal reports installed on the computer?
krishna97 4-Aug-13 9:35am    
yes sir
this error given run time
[no name] 4-Aug-13 9:59am    
Is that the correct path for that dll? Did you see if any of the dependencies are missing? file:/// is an unusual item for a winform application.
krishna97 4-Aug-13 10:02am    
ok this code
con.Open();
OleDbCommand cmd = new OleDbCommand("Select * from kkp", con);
OleDbDataAdapter sdt = new OleDbDataAdapter(cmd);
DataTable ds = new DataTable();
sdt.Fill(ds);
CrystalReport2 crp = new CrystalReport2();
crp.SetDataSource(ds);
crystalReportViewer1.ReportSource = crp;
crystalReportViewer1.Refresh();
con.Close();
Member 11050074 5-Mar-19 9:21am    
hahaha

See Crystel Report Error in VS2010[^]
A solved question

linking to the following suggestion:

when u received this kind of 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."
try to add this to your .config file (usually app.config)
XML
< startup useLegacyV2RuntimeActivationPolicy="true">
< supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
< /startup>


Good luck,
Edo
 
Share this answer
 
Comments
krishna97 4-Aug-13 12:10pm    
i am used this code also but same error given
Joezer BH 4-Aug-13 12:14pm    
Have a look at solution 1 in this thread, there is another suggestion you might as well try it out:
CP previous same question thread
Member 13391365 3-Sep-17 13:14pm    
i am used this code also its work for me , thanks.
votch18_x3m 30-Oct-13 22:43pm    
Thanks men! it works for me...
Joezer BH 30-Dec-13 1:49am    
Glad it helped :)
Add below script to "ApplicationConfiguration" file and rebuild your project

<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
 
Share this answer
 
Comments
CHill60 12-Jul-17 7:41am    
Which is the accepted solution from nearly 4 years ago!
NiravPatel19081988 3-Aug-17 10:37am    
Thanks a lot Sir
Chrisbabb 30-Aug-17 7:44am    
I have been searching for a solution for weeks to dynamically set the database without success. I changed to use a dataset but got the file not found error so initially dismissed that method. Luckily I found this post, now very happy!!
thanks bro it working

< startup useLegacyV2RuntimeActivationPolicy="true">
< supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
< /startup>
 
Share this answer
 
Comments
CHill60 5-Mar-19 8:21am    
Don't post comments as solutions. Use the "Have a question or comment" link next to the post and/or use the star voting system
its work for also...thanks buddy......
 
Share this answer
 
Comments
CHill60 23-Dec-20 3:57am    
If you want to comment on a solution then use the "Have a Question or Comment?" link next to it. Don't post comments (or questions) as a "Solution" to a post

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