I have window7 64 bit machine, I have installed visual studio 2010 32 bit and crystal report 11 relse2 32 bit on this machine.
Every time I try to run the project from visual studio 2010, I get build error as below.
'CrystalDecisions.Windows.Forms.CrystalReportViewer' is not defined. C:\Fire Studio 2010\FireProject 2010\frmIInspectionInfo.vb 3298 47 FireProject.
Ensure that the viewer is of version 13.x, not 11.5:
The viewer is defined by CrystalDecisions.Windows.Forms.CrystalReportViewer assembly and you need to ensure that your project is using the viewer from the correct version assembly.
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Ahhh - note to self; read, read, read
here is what you'll need to do:
Go to this page:
Download the Install Executable, Support pack 6.
Run the Install Executable. This will integrate 'SAP Crystal Reports, developer version for Microsoft Visual Studio' into VS 2010. Assemblies will be of version 13.x
Open your existing project. It should automatically upgrade the CR assemblies to v. 13.x.
Voila (I hope...)
Once you get to distribution of the project, you can use the MSM, MSI or clickonce (links in the same page as above).
I have installed crystal run time 13.0.6 as you suggested but I can't find a reference to the crystal viewer 13. Where does it get installed ? I tried installing both version 32 bit and 64 bit. I am unable to add reference to crystal viewer 13. I checked both folders (program files and program files(64)).
Set your project to use the full 4.0 framework, not client frm. Then the viewer should be available from the toolbox. See this blog for more info.
If I change framework to 4.0 then I get following error for oracle.dataaccess.
BindingFailure was detected
Message: The assembly with display name 'Oracle.DataAccess'
failed to load in the 'Load' binding context of the AppDomain with ID 1.
The cause of the failure was: System.BadImageFormatException: Could not load file
or assembly 'Oracle.DataAccess, Version=126.96.36.199,
or one of its dependencies. An attempt was made to load a program with an incorrect format.
I resolve oracle issue, I had to select Targer CPU x64 . Everything used to work perfectly fine when my development machine was windows 7 32 bit machine. I started having issues after I changed a development to window7 64 bit. Now I get error related to crystal as below. I have installed crystal runtime for windows 32bit and 64 bit.
System.TypeInitializationException was unhandled
Message=The type initializer for 'FireProject.modSSILib' threw an exception.
at FireProject.modSSILib.ReformatSQLForQuotesAmpersand(String& SQLStatement)
at FireProject.modFireProject.ExecuteSqlStatement(String& sretmsg, OracleDataReader& oReader, String ssql) in C:\Fire Studio 2010\FireProject 2010\modFireProject.vb:line 1237
at FireProject.modFireProject.SetRoleForUser(String& sRetmsg) in C:\Fire Studio 2010\FireProject 2010\modFireProject.vb:line 994
at FireProject.frmSLogin.Button1_Click(Object sender, EventArgs e) in C:\Fire Studio 2010\FireProject 2010\frmSLogin.vb:line 313
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String commandLine)
at FireProject.My.MyApplication.Main(String Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
Message=The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
Message=An error has occurred while attempting to load the Crystal Reports runtime.
Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.
Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information.
I'd really like to see that report working in the CR designer on that computer; please install CR 2011 from here;
Then open the report in the CR 2011 designer and see if it runs there.
As per you instruction, I installed crystal report trial version and opened an existing report. All my reports are using ORACLE PROVIDER FOR ORACLE DB. When I try to make connection, I don't have an option to select OLE DB (ADO)/ Oracle provider for OLE DB. So I selected Microsoft OLE DB provider for Oracle. I got following error.
Why oracle provider for ole db connection is not available? All my reports are using Oracle provider for OLE DB.
Detail: ADD Error COde: 0x80004005
Source: MIcrosoft OLE DB Provider for ORacle
Description: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
Provider is unable to function until these components are installed.
Never use MS OLE DB. I believe it only supported Orcale 7... and it was pretty wonky even then.
So, this then, becomes the critical issue:
All my reports are using ORACLE PROVIDER FOR ORACLE DB. When I try to make connection, I don't have an option to select OLE DB (ADO)/ Oracle provider for OLE DB.
If you created the report using ORACLE PROVIDER FOR ORACLE DB, it is your responsibility to ensure that the correct Oracle driver is available on the deployed computer.
I installed 32bit ODAC and I was able to run report from trial version of crystal report.
Now I get build error in visual studio, I am unable to add project reference crystalDescision.reports.engine.dll. There are 102 build errors most of them are repeated as below.
Type 'CrystalDecisions.CrystalReports.Engine.Section' is not defined. C:\Fire Studio 2010\FireProject 2010\rptAppliedCredits.vb 57 56 FireProject
Type 'FormulaFieldDefinitions' is not defined. C:\Fire Studio 2010\FireProject 2010\frmRegistrationsPermitsNJ.vb 19918 24 FireProject
That would indicate something incorrect with the CR runtime, not sure. I am beginingto think that creating a phone case will be a good idea here(?). Seems like we're going one step forward, two steps back... Phone cases can be created here:
I don't really want to go over the whole thread, but surely somewhere in it we've already been over the fact that crystal 11 rel2 is not supported in visual studio 2010(?). If not, it's a good piece of info for you. Download SAP Crystal Reports, developer version for Microsoft Visual Studio and use that.