Thursday, December 27, 2012

Solve: Error while displaying crystal report using visual studio 2010, 2012, 2013

The error message while trying to display crystal report using visual studio 2010
System.IO.FileNotFoundException was unhandled
Could not load file or assembly 'file:///C:\Program Files (x86)\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.
 Source=mscorlib
 FileName=file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll
 FusionLog==== Pre-bind state information ===
 LOG: User = WKST04\GARYB
 LOG: Where-ref bind. Location = C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll
 LOG: Appbase = file:///D:/S_and_G/LMS_DotNet/LMS_Solution/LMS/bin/Debug/
 LOG: Initial PrivatePath = NULL
 Calling assembly : (Unknown).

Solution: 
  1. First, set your framework to 4.0 full, not the client. CR requires access to the full framework.

  2. Then add this to your app.config:
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
 

16 comments:

  1. din solve the problem :( i have target framework as .net 4.0 and have set up same in app.config.. but i get same error message

    ReplyDelete
    Replies
    1. clean the solution then try again

      Delete
    2. عزيزي الأستاذ محمد
      تحياتي إليك
      انت هنا ذكرت طريقة الحل وهي فعلا تمت معي بنجاح واشتغلت التقارير بفضل الله جزاك الله خيرا .. بس للسهوله أكتر يجب ذكر مكان التعديل لأن في ناس كتيير مبتدئة زي حالاتي مكنش يدرك وين مكان التعديل

      Delete
    3. This comment has been removed by the author.

      Delete
    4. i really have the same problem i past the dll on file dotnet1 for my config its just the same us u could u plz help me i have VS2010

      Delete
    5. Sorry, I didn't understand, what is the error message

      Delete
  2. yes this work for me :-)
    exactly

    ReplyDelete
  3. perfectly work man
    thanks a lot

    ReplyDelete
  4. Helpful.
    Thank you.

    ReplyDelete
  5. Wow man Good Job.. Thank you (Y)

    ReplyDelete
  6. working, thank you

    ReplyDelete
  7. thanks for the help. i follow the step and my crystal reports are working now.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete