SOLVED: Error 0x800a1391 – JavaScript runtime error: ‘bobj’ is undefined

crystal report logo

You might encounter this error ‘Error 0x800a1391 – JavaScript runtime error: ‘bobj’ is undefined‘ when trying to run a Web Page (that is written in ASP.NET) that contains a CrystalReportViewer. When this error first came up in my end, it took me several days to solve it. I have seen several posts about this error, but nothing really helped me until I followed these steps:

(I am using Visual Studio Ultimate 2012 and Crystal Report v13)

1. Make sure Crystal Report is installed. The 2010 and 2012 versions of Visual Studio have no bundled Crystal Reports with them, so installing it is a must if you want to make custom reports. You can verify if its installed by going to Programs and Features (see the image below). If you can’t find it there, download and install Crystal Reports here.

verify crystal report

2. Make sure Crystal Reports is referenced. Open the list of references being used by your project (Project > Add Reference > Extensions). Make sure Crystal Reports’ references are checked just like what you see below.verify crystal report reference

3. Check your Web.Config file. Your Web.Config file should contain the following:

<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral,PublicKeyToken=692fbea5521e1304, Custom=null" />
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler" />
</sectionGroup>
</sectionGroup>
</configSections>
<businessObjects>
<crystalReports>
<rptBuildProvider>
<add embedRptInResource="true" />
</rptBuildProvider>
<crystalReportViewer>
<add key="ResourceUri" value="/crystalreportviewers" />
</crystalReportViewer>
</crystalReports>
</businessObjects>

4. Lastly, copy Crystral Reports’ files. Go to the installation directory of Crystal Report (C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\Crystal Reports 2011). If you are using a 32-bit OS, go to (C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\Crystal Reports 2011). You will find a ‘crystalreportviewers’ folder. Copy the whole folder into these two locations: (1) C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319 (2) C:\Users\tamay_000\Documents\Visual Studio 2012\Projects\<name of your project>\<name of your project>. The 2nd location is where your project is. Please see the attached photos for your reference.

inetpub

(1) inetpub

Project's location

(2) Project’s location

After following these steps, don’t forget to Rebuild your project. And voila, the “Error 0x800a1391 – JavaScript runtime error: ‘bobj’ is undefined” is gone!

30 comments on “SOLVED: Error 0x800a1391 – JavaScript runtime error: ‘bobj’ is undefined

  1. Hi,

    I installed CRforVS_13_0_2.exe and then CRRuntime_64bit_13_0_5.msi.
    I am using Windows 8 (64 bit) OS.
    I tried all the above but the error has not yet resolved.

    Any help will be appreciated.

    Thanks in advance.

    • If you’re using Visual Studio, then open your web.config and put it at the beginning (AFTER the commented out auto-generated section).

  2. Pingback: Some tips of ASP.NET & MVC4 | The Iznaga's Blog

  3. Having experienced many bobj errors in the past I was so pleased when your step by step guide fixed mine. Thank you so much

  4. Hi,

    I am having a problem with step 3.

    When I paste the code as is, the syntax checker tells me:

    Invalid token “Text” at root level of document.

    I am sure that this is an XML issue and any help is appreciated.

  5. Ok. I’ve gone past the first error by adding signs and include a before all of the code. But now it doesn’t like the saying that:

    XML documents cannot contain multiple root level elements.

    Again any help is appreciated.

  6. Its throw me this error “HTTP Error 500.19 – Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.” and pointing to “”. any idea what is happening?

  7. Pingback: Crystal Reports 13 bobj is undefined JavaScript Error after installed visual Studio 2015 community edition - BlogoSfera

  8. Hi, I am using VS 2012 and CR 2013 (64 bit environment). I did all the steps.. Still I am getting bobj undefined.. Any idea? Your help is much appreciated.. This is kind of killing me for the last 2 days..

  9. I am using VS2013 (64 Bit Environment) . I have done all the steps . But Still i am getting same Error. Please anybody can guide me..

  10. How did you get the Crystal extensions into VS 2012. I have 32 and 64 bit Crystal 13 runtimes installed, but only see Crystal 10 in the extension selection list.
    I’m targeting .Net 4.5. The project had worked in VS 2008.

Leave a Reply