Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

bobj undefined + ASP .NET MVC 3 + crystalreportviewers13

Hi everyone,

My environment

I am developping a web application by using the ASP .NET MVC 3 framework.
I am using :

  • Visual Studio SP1.
  • Windows XP Professional.
  • My IIS 5.1 local.

I have installed :

  • SAP Crystal Reports 2011.
  • SAP Crystal Reports for Visual Studio 2010 by running CRforVS_13_0_1.exe.

I have got the two following virtual directories under my default web site on IIS :

  • The virtual directory corresponding to my VS2010 project.
  • aspnet_client which is the ancestor of the crystalreportviewers13 folder. The latter contains the ressources needed by a CrystalReportViewer control such as CSS and JS files.

My goal

I want to generate an HTML5 page containing a Crystal Report viewer.

I have implemented an action method in a controller.
I fill a DataTable in my action method and then I use it as a source for a ReportDocument.
Then I pass the ReportDocument to a Razor view.

I call a ViewUserControl in my Razor view and I pass the ReportDocument to the ViewUserControl.
The code of my ViewUserControl is contained in a ".ascx" file.
My ViewUserControl contains a CrystalReportViewer control.

I use the ReportDocument as a source for the CrystalReportViewer control in the Page_Init event method.

My issue

When I load my HTML5 page then I face the famous JavaScript error : "bobj is undefined".
The JavaScript error is relative to the CrystalReportViewer control.

A reference to the following JavaScript file is missing :

But the reference to the following CSS file is present and works :

I do not understand why the JavaScript reference is not generated.

Does someone can help me ?
I precise that I have searched for a solution for two days and I have tried some fixes without success.

Former Member
Not what you were looking for? View more on this topic or Ask a question