Crystal Reports loading Error at runtime

thirteentwenty

Well-known member
Joined
Oct 9, 2008
Messages
80
Location
Honolulu
Programming Experience
Beginner
Hello good people of vbdotnetforums!


Well I thought I had all my bases covered.. but then ran into a problem with viewing Crystal Reports on ONE machine... and I cannot duplicate this error...

************** Exception Text **************
System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
at DepoLedger3.frm_rptViewer..ctor()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

--- End of inner exception stack trace ---
at DepoLedger3.My.MyProject.MyForms.Create__Instance__[T](T Instance)
at DepoLedger3.My.MyProject.MyForms.get_frm_rptViewer()
at DepoLedger3.frm_reports.lst_reports_reports_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ListBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ListBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


I see that it "cannot" load 'CrystalDecisions.Shared...' but I'm not sure why, It runs other Crystal Reports (made with older versions).

Maybe I'm not reading the error correctly...

I've double checked my prerequisites and believe that they are all there...
  1. Microsoft Data Access Components 2.8
  2. .NET Framework 2.0
  3. Crystal Reports 2008


As I stated at the beginning of the post I am unable to recreate this error on other machines...

Any suggestions?
 
OK, I was able to recreate the error by uninstalling Crystal Reports on my computer... Now I've got a host of errors and warnings in VS.

Warning 1 Could not resolve this reference. Could not locate the assembly "CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DepoLedger3

Warning 2 Could not resolve this reference. Could not locate the assembly "CrystalDecisions.Enterprise.Framework, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DepoLedger3

Warning 3 Could not resolve this reference. Could not locate the assembly "CrystalDecisions.ReportSource, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DepoLedger3

Warning 4 Could not resolve this reference. Could not locate the assembly "CrystalDecisions.Windows.Forms, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DepoLedger3

Warning 5 Could not resolve this reference. Could not locate the assembly "CrystalDecisions.Enterprise.InfoStore, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DepoLedger3

Warning 6 Could not resolve this reference. Could not locate the assembly "CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DepoLedger3

Warning 7 Variable 'strUserName' is used before it has been assigned a value. A null reference exception could result at runtime. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_main.vb 24 16 DepoLedger3

Warning 8 Variable 'strPassword' is used before it has been assigned a value. A null reference exception could result at runtime. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_main.vb 24 42 DepoLedger3

Error 9 Type 'CrystalDecisions.Windows.Forms.CrystalReportViewer' is not defined. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.Designer.vb 26 42 DepoLedger3

Error 10 Name 'CrystalDecisions' is not declared. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.Designer.vb 42 52 DepoLedger3

Error 11 Type 'CrystalDecisions.Windows.Forms.CrystalReportViewer' is not defined. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.Designer.vb 57 50 DepoLedger3

Warning 12 Namespace or type specified in the Imports 'CrystalDecisions.Shared.ConnectionInfo' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.vb 1 9 DepoLedger3

Warning 13 Namespace or type specified in the Imports 'CrystalDecisions.Shared.TableLogOnInfo' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.vb 2 9 DepoLedger3

Warning 14 Namespace or type specified in the Imports 'CrystalDecisions.CrystalReports.Engine.Tables' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.vb 3 9 DepoLedger3

Warning 15 Namespace or type specified in the Imports 'CrystalDecisions.CrystalReports.ViewerObjectModel' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.vb 4 9 DepoLedger3

Error 16 Type 'CrystalDecisions.CrystalReports.Engine.Table' is not defined. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.vb 8 18 DepoLedger3

Error 17 Type 'CrystalDecisions.Shared.ConnectionInfo' is not defined. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.vb 11 24 DepoLedger3

Error 18 Type 'CrystalDecisions.CrystalReports.Engine.ReportDocument' is not defined. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.vb 12 28 DepoLedger3

Error 19 Type 'CrystalDecisions.Shared.ConnectionInfo' is not defined. C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\DepoLedger3.1\DepoLedger2\frm_rptViewer.vb 15 28 DepoLedger3

I'll keep this thread posted as to what I've found...
 
Figured it out... somehow (I guess by installing the latest version of CR) I managed to break the viewer... So what I did was stated above uninstall CR to replicate the error, then uninstalled the Crystal Reports components from VS2005 then reinstalled them. After the reboot rebuilt my Report Viewer form and all was well... it runs on my machine again. Tomorrow I test on the problem machine.
 
Problem resolved in fix noted above.

/me yays!
 
Back
Top