none
Crystal report failure RRS feed

  • Question

  •  

    I have created an application which uses the Crystal Reports add on. All reports work except for four reports which all set the datasource at runtime using the line

    crDocument.Database.Tables(0).SetDataSource(dstStock)
    

    Whenever it hits this line it fails with the following error message

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

    Additional information: 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\win64_x64\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.

    Can anyone tell what is going on? The dotnet1 directory does not exist but the dll does exist in win64_x64. Where is it getting this setting from? I have tried reinstalling but it still comes up with the same error/

    Monday, January 30, 2012 2:51 PM

Answers

  • Hi Rozy

    Thanks for responding, I tried adding the startup statements suggested,

    <startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0"/>
    </startup>


    and also

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

    But all I get is a run time error which stops the application. The error is

    The type initializer for 'System.Data.SQLClient.SQLConnecion' threw an exception.

    If I remove these lines it starts up OK again???

    Thanks

     

    • Marked as answer by Ray.B Monday, February 6, 2012 10:57 AM
    Monday, February 6, 2012 10:28 AM

All replies

  • Hi Ray.B,

    Check below similar issue.

    http://forums.sdn.sap.com/thread.jspa?threadID=1802638

     

    Regards

    Rozy

    Thursday, February 2, 2012 4:36 PM
  • Hi Rozy

    Thanks for responding, I tried adding the startup statements suggested,

    <startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0"/>
    </startup>


    and also

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

    But all I get is a run time error which stops the application. The error is

    The type initializer for 'System.Data.SQLClient.SQLConnecion' threw an exception.

    If I remove these lines it starts up OK again???

    Thanks

     

    • Marked as answer by Ray.B Monday, February 6, 2012 10:57 AM
    Monday, February 6, 2012 10:28 AM
  • Hi Rozy,

    Forget my last, I had a typo, it now seems to be working!

    Many thanks for the link.

    Monday, February 6, 2012 10:57 AM
  • Thank You. This solved my problem after many days on Google looking for a solution
    Saturday, June 27, 2015 4:15 PM