15 Replies Latest reply: Sep 3, 2013 4:27 PM by Ludek Uher RSS

Unable to run visual studio 2010 project

HEMANGINIBEN PATEL
Currently Being Moderated

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.

  • Re: Unable to run visual studio 2010 project
    Ludek Uher
    Currently Being Moderated

    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.

     

     

    - Ludek

    Senior Support Engineer AGS Product Support, Global Support Center Canada

    Follow us on Twitter

    Got Enhancement ideas? Try the SAP Idea Place

    Share Your Knowledge in SCN Topic Spaces

  • Re: Unable to run visual studio 2010 project
    HEMANGINIBEN PATEL
    Currently Being Moderated

    Ludek,

     

    Thank you so much for your response.

     

    Where can I down load 13.x crystal report viewer? I can only find crystal Report Viewer 2011.

    • Re: Unable to run visual studio 2010 project
      Ludek Uher
      Currently Being Moderated

      Ahhh - note to self; read, read, read

       

       

      here is what you'll need to do:

       

      Go to this page:

      http://scn.sap.com/docs/DOC-7824

       

      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).

       

       

       

      - Ludek

      • Re: Unable to run visual studio 2010 project
        HEMANGINIBEN PATEL
        Currently Being Moderated

        Ludek,

         

        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)).

        • Re: Unable to run visual studio 2010 project
          Ludek Uher
          Currently Being Moderated

          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.

           

           

           

          - Ludek

          • Re: Unable to run visual studio 2010 project
            HEMANGINIBEN PATEL
            Currently Being Moderated

            Ludek,

             

            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=4.121.1.0,

            Culture=neutral, PublicKeyToken=89b483f429c47342'

            or one of its dependencies. An attempt was made to load a program with an incorrect format.

            • Re: Unable to run visual studio 2010 project
              Ludek Uher
              Currently Being Moderated

              I wonder if your version of Oracle supports framework 4? Something to ask Oracle?

               

              You could try framework 2, 3, or even 3.5.

               

               

               

              - Ludek

              • Re: Unable to run visual studio 2010 project
                HEMANGINIBEN PATEL
                Currently Being Moderated

                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.
                  Source=FireProject
                  TypeName=FireProject.modSSILib
                  StackTrace:
                       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.OnRun()
                       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
                       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 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
                       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
                       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
                       at System.Threading.ThreadHelper.ThreadStart()
                  InnerException: System.TypeInitializationException
                       Message=The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
                       Source=CrystalDecisions.CrystalReports.Engine
                       TypeName=CrystalDecisions.CrystalReports.Engine.ReportDocument
                       StackTrace:
                            at CrystalDecisions.CrystalReports.Engine.ReportDocument.Finalize()
                       InnerException: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException
                            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.
                            Source=CrystalDecisions.CrystalReports.Engine
                            StackTrace:
                                 at CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime()
                                 at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
                            InnerException:

Actions