In this article I will explain how to solve the JavaScript errors Bobj is undefined and bobj.isObject is not a function when Crystal Report is used with Visual Studio 2012 and 2013.
 
Crystal Reports Bobj is undefined and bobj.isObject is not a function in Visual Studio 2012 and 2013
 
Cause
Below is the source of the page and you will notice that the IIS Server in Visual Studio 2012 and 2013 look for the crv.js JavaScript file in aspnet_client folder which does not exists.
The same will work for Visual Studio 2010 as it uses ASP.Net Web Development server and is able to load the required files.
Crystal Reports Bobj is undefined and bobj.isObject is not a function in Visual Studio 2012 and 2013
 
 
Solution
1. Install proper Crystal Reports Runtime
You can refer my article on downloading and installing runtime for Crystal Reports 13 for Visual Studio 2010.
Note: First find the architecture of the hardware of your server i.e. 32 Bit or 64 Bit and based on that install appropriate runtime.
 
Also make sure you restart the server after installing Runtime to complete and finalize the installation.
 
2. Copy the Crystal Report Support files to your Website Root Directory
Once the runtime is installed. Crystal Reports will install the required support files in the location.
C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\
Crystal Reports Bobj is undefined and bobj.isObject is not a function in Visual Studio 2012 and 2013
 
Note: Here the Windows installation Drive is C. It may be possible on some machines it may be something else, for example D. Thus you need to change the path accordingly.
 
Now you need to copy the crystalreportviewers13 folder from the above location and paste in your Website project’s root folder as shown below.
Crystal Reports Bobj is undefined and bobj.isObject is not a function in Visual Studio 2012 and 2013
 
3. Correcting the Script Location
Since the default script of Crystal Reports are not loading. We now need to add the script tag pointing to the crv.js JavaScript file in the crystalreportviewers13 folder inside the Website root folder.
You need to place the script tag in the Head section of the page or Master Page if you are using Master Pages.
<head runat="server">
    <title></title>
    <script src='<%=ResolveUrl("~/crystalreportviewers13/js/crviewer/crv.js")%>' type="text/javascript"></script>
</head>
 
The following screenshot displays the crv.js JavaScript file loading from the crystalreportviewers13 folder inside the Website root folder.
Crystal Reports Bobj is undefined and bobj.isObject is not a function in Visual Studio 2012 and 2013
With the above fix the Crystal Reports will start working in Visual Studio 2012 and 2013 versions.