Skip to Content
Author's profile photo Former Member

Crystal Reports .NET 2010 : 3 Tips To Keep You Sane

I’m seeing a lot of activity on the forums about common problems when you’re first getting started wth Visual Studio .NET 2010. In this blog I address the three most common ones. It may also be easier to see this use a screencast video, so I uploaded one to YouTube that you can watch. It is on the download link on this page, or you can go directly to YouTube:


First, Crystal Reports .NET is no longer included with Visual Studio .NET 2010. it is a separate download. Use this link to download it to your application and install it after you have installed Visual Studio .NET 2010.


Second, you will find that the Crystal Reports viewer is strangely missing from the Visual Studio toolbox. To fix this go to Project > Properties. Set the Target Framework to be .NET Framework 4 (this might be easier to see in the video). After doing so, you application will close and re-open and the viewer will now be in the toolbox.


Third, the Crystal Reports DLLs were written with .NET Framework 2 and they are compatible with Framework 4 as wel. But your application needs to have mixed-mode compatibility turned on for it to use the Crystal assemblies. You should add this property to the Startup tag in the app.config file


Again, this might be easier to see in the video’s complete code walkthrough.

Once you’ve done those three steps, you should be able to get up and running with Crystal Reports in Visual Studio .Net 2010.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Bob Schild
      Bob Schild
      Where is/are the video(s) you refer to?
      Author's profile photo Former Member
      Former Member
      Hi Bob, in the top right corner there is a link "Download Media" that will show it to you. Also, in the first paragraph I have the full link to it on YouTube.
      Author's profile photo Bob Schild
      Bob Schild
      I found it. At first I was getting a "Not found" error.
      Author's profile photo Former Member
      Former Member
      Hi You Sane,

      After viewing your ytube film, I insertet the requested code


      in "app.config".

      The result is that my application brings up an initialisation error:
      "System.Data.SqlClient.SqlConnection" - "System.TypeInitializationException ".

      Can you help me with an additional advice?

      Many thanks in advance and best regards

      Author's profile photo Former Member
      Former Member
      I developed VS 2010+Crystal Reversion 13 seem your blog then I worked fine,But I deployed my web app to window 2008 server,I got Error 'bobj is undefined' and EventViewer is 'BusinessObjects.Licensing.KeycodeDecoder.dll, cannot be loaded'

      I searched 'bobj is undefined' article in google.
      Result told me that
      1. add this text in web.config



      which my project is
      Project name(visual web)/AppForm/crystalreport.aspx

      2. crystalreportviewers13 is my vitual web server from physical path in

      but I can't solve my problem!

      please you guide me if you have solution.

      Thank for your advance.

      Author's profile photo Former Member
      Former Member

      However the keycode DLL is still missing. Please see

      Author's profile photo Former Member
      Former Member
      Brian, thank you for the post, however after following your post, I need help. I've developed a web app using visual studio 2010 ultimate in windows 7 (app was originally developed in vs2008).

      All of my reports were working locally and on my dev server when I had crystal for vs2010 beta in stalled.

      After installing cr for vs2010 release, it still works on my local machine but fails on my dev server (MS windows server 2003 R2, IIS 6.0) with the following error:

      Exception information:
          Exception type: TypeInitializationException
          Exception message: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
         at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
         at CrystalDecisions.ReportSource.CachedReport.get_ReportDocument()
         at CrystalDecisions.Web.CrystalReportSource.set_Report(Report value)

      Afer following point #3, the same error was generated.

      If I reference the cr version 10.5.3700.0 instead of version 13.0.2000.0, the report runs.

      Any help would be greatly appreciated.

      Author's profile photo Former Member
      Former Member
      try to compile you project with x86 platform instead of AnyCpu
      Author's profile photo Former Member
      Former Member
      Now I have solved all problem about crystal report V13+vs 2010 already.

      if you worked fine on your local iis but have problem with deploy server.

      1. I need to using Web Application.

      2. Copy crystalreportviewers13 folder to your project

      3. Publish Profile with File system.

      4. Install CRRuntime_32bit_13_0.msi

      5. Copy in your publish file system to server and create vitual point to this folder.

      my Web.Config








      let me know if you have some problem.

      Author's profile photo Former Member
      Former Member
      Hello Naphong.
      After modifying my web.config file with your code and assigning full access to the Network Service user in the Windows\Temp folder (on the server), I'm happy to report that my crystal reports are now running without error.

      Thank you very much for your assistance.

      Author's profile photo William Voorhees
      William Voorhees
      myreport.DataDefinition.RecordSelectionFormula = "{EmployeeTable.IDNum} = " & intID & " and {EmplHourTable.HourType} = " & "'D'"

      This record selection formula works perfectly in VS 2005 and Crystal.
      When converted to VS 2010, the program works every time except the 1st time where all records are selected.

      I'm stumped. HOw could it not work the first time I hit the run report button, but work all subsequent times?

      I cannot convert to 2010 until I resolve this simple thing.

      Author's profile photo Former Member
      Former Member
      Thanks for the Tips,

      I wonder If you would be able to offer advice on a Web Deployment of CR 2010 to Server 2008 R2.

      Cyystal runs on the server but the viewer does not display. When comparing the Code behind on VS2010 Dev Server for the Viewer page with that on the Production server, it is essentially identical (the differences being the server hosting the page), however on the Dev Web Server the Report viewer is visbile while on the production server it is not.

      The applications Web.Config complies with that of those shown in the Blog.



      Author's profile photo Former Member
      Former Member
      I have same your server,It worked with me already.

      1. Please try to CRforVS_13_0_1.exe for Developing,
      2. try to download runtime with for 32 bit for 32 bit
      to your server only,No client.
      3. please check your config which i had posted before this comment of me(Naphong).
      let me know it you have any problem.

      Author's profile photo Former Member
      Former Member
      Hi Naphon,

      No Joy.
      Done all that.
      Only difference is that I'm using 13_1 redistribution packages for x86 AND x64 and Net Framework 4.


      Author's profile photo Former Member
      Former Member
      Would it be possible for you to post a similar walkthrough for 4.0 website? I followed the tutorial for the Windows app and it works fine but I'm getting different behavior for the web app.