cancel
Showing results for 
Search instead for 
Did you mean: 

0x800a1391 - JavaScript runtime error: 'bobj' is undefined error

Former Member
0 Kudos

Hi,

I am new to crystal reports. I have a requirement to display CR in ASP.Net web app.

I have installed SAP CR version for VS(13) in my machine.

runtime engine 64

Config :

window server 2008 r2(64)

.net framework 4

IIS Express 8

VS 2012

I have added a crystal report viewer control in my default page and given data source as "C:\sample.rpt"

web.config enteries:

<configSections>

    <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"></add>

      </rptBuildProvider>   

      <crystalReportViewer>

        <add key="resourceURI" value="~/crystalreportviewers13" />

      </crystalReportViewer>

    </crystalReports>

  </businessObjects>

My app pool is default app pool which is classic mode

i have copied CrystalReportViewers13 to my project working folder

I have chosen IIS web server instead of IIS express in my project properties.

When I run in debug mode, i get the following error

0x800a1391 - JavaScript runtime error: 'bobj' is undefined error

 

<script type="text/javascript">

//<![CDATA[

bobj.crv.stateManager.setComponentState('CrystalReportViewer1__UI',eval('('+document.getElementById('__CRYSTALSTATECrystalReportViewer1').value+')'));

WebForm_InitCallback();new bobj.crv.ViewerListener('CrystalReportViewer1__UI',new bobj.crv.AspDotNetAdapter("__doPostBack('CrystalReportViewer1','VIEW-CONTEXT')", "VIEW-CONTEXT", "__CRYSTALSTATECrystalReportViewer1","WebForm_DoCallback('CrystalReportViewer1','arg','cb','ctx','errcb',true)","4.0.30319.18055"));//]]>

</script>

Pls. let me know how to solve it.

Thanks.


Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi Prasanna,

You have done most of the work, this error occurs when the app could not find the viewr files.

The best would be to run ProcessMonitor, and search the log for CrystalReportViewers13 folder.

I mainly do a search for crv.js, the log entry will tell you where the application is looking for the viewer files. Then you could manually copy the CRViewer13 folder and paste at that location.

Its best to copy the folder from CR installation directory or IIS root folder.

Make sure you are using CR for VS 2010 SP8. (Instal package EXE should be installed on top of VS)

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

Thanks,

Bhushan

Former Member
0 Kudos

Hi,

This works for me

a) copy crystalreportviewers13 from "C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319" into your project working folder

b) There's a button in Solution Explorer called "Show All files". Click on it and then select the folder "crystalreportviewers13" and include to the project:

c) add these lines to your web.config

  <configSections>

      <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"></section>

        </sectionGroup>

      </sectionGroup>

    </configSections>

    <businessObjects>

      <crystalReports>

        <rptBuildProvider>

          <add embedRptInResource="true"/>

        </rptBuildProvider>

        <crystalReportViewer>

          <add key="ResourceUri" value="~/crystalreportviewers13"/>

        </crystalReportViewer>

      </crystalReports>

    </businessObjects>

TRY IT!!!

IF IT NOT WORK CHANGE LINE <add key="ResourceUri" value="~/crystalreportviewers13"/> TO <add key="ResourceUri" value="../crystalreportviewers13"/>

TRY IT AGAIN!!!!

IF IT NOT WORK AGAIN:

a1) copy all files under "C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\Crystal Reports 2011\crystalreportviewers"

and paste to C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13

b1) repeat steps a) and b)

Best regards,

Aleksandar

Answers (1)

Answers (1)

0 Kudos

Hopefully this will help you Error BOBJ Crystal Report Solution - YouTube