cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BOBJ is undefined

Former Member
0 Likes
682

Hello,

is anyone willing to help us with the Crystal report for VS2010 setup? We are getting this jscript error that prevents the report to display.

here is the environment we're working with:

VS2010 professional on Vista 32-bit

deploy web site in C# to Win server 2008 32-bit

Installed Crystal Report for VS2010 from:

/people/coy.yonce/blog/2010/11/12/crystal-reports-for-visual-studio-2010-production-release-now-availableCystlR%2528SAPWeblogs%253ACrystal+Reports%2529

which should be the current release version.

I installed the 32-bit for VS and the redist 32-bit (runtime) on the server.

Every time I have a Crystal Report Viewer on a page to display the browser shows the jscript error: bobj is undefined for that page and the report doesn't work.

I saw numerous posts about this error but I never found a solution that works forme.

Here what I tried:

- reinstalled CR products

- change target to .NET 4 classic

- copied aspnet_client on the same folder I have the web site

- empty CR viewer with no CR file attached nor data

- created a web site solution specific for CR

- created a project where I dropped a CR viewer on the default.aspx page

- tried to change properties on the CR viewer

- added on the page where I have the CR viewer a direct reference like:

<%@ Reference VirtualPath="crystalreportviewers13/js/crviewer/crv.js" %> but it doesn't work, it looks like the scripts have to be executed within the viewer because I get: JS1135: Variable 'bobj' has not been declared

Any other suggestions?

Why CR for VS2010 is sooo difficult to setup on the server? We are small business company we don't have much time to dedicate to this problem, if I can't make it to work in the near future we are going to explore other companies/ways to create reports. Any suggestions also on CR alternatives?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

First set your CPU to x86 only and then search our Kbase system for "bobj" and you'll find the causes and solutions.

The problem is the x86 and x64 and CR in both flavors. It's a Visual Studio Configuration mostly and what your targeted framework and CPU support. At the beginning of this forum you'll find sticky [posts |;on typical errors and how to configure VS and your project to work on your destination OS and Bit version.

It's not that its hard, it just needs to be defined/declared properly.

Thank you

Don

Former Member
0 Likes

Don,

Thank you very much for trying to solve the problem.

As you can see, we already have another person with the same problem in this new post alone.

So it's definitely a common problem.

In my opinion the solution should be posted on the front page of your web site with a very big font.

Sorry to say but I have to disagree with your idea to search the forum which was one of the first things I did:

http://forums.sdn.sap.com/search.jspa?threadID=&q=bobj&objID=f313&dateRange=last90days&numResults=15

In most cases users resolved the problem by making a copy of the cristalreportviewer13 folder, in my case the crviewer13 is found, beside I'm dealing with VS2010 some settings screens are very different than VS2008 the CR version is different too.

For example in VS2010 I can not select a specific CPU (I only have Active (Any CPU)) or .NET 4 classic framework, I only have .NET 4 framework, should I install .NET 4 framework classic? Where do I get it?

What I did tried is to set .NET 4 classic on the server but the problem still persists.

Can you PLEASE post your solution if you have one?

I'm wasting so much time reasearching internet, fine prints and hidden possible solutions.

Sorry if I sound a little frustated but the matter of fact is that I actually am.

0 Likes

Hello,

Hello, I understand your frustrations... 32 and 64 bit is relatively new and gets very complex with deployments and dependencies and third party drivers and hardware.... This should all be scoped out in your project when you first begin to plan your project. Making one project to support both is potentially a large deployment package and much easier, at this early stage of 64 bit support, to have separate packages, 32 and 64 bit.

CR 5 came in both 16 and 32 bit installs and runtime and that version was two separate packages, same is true no for 32 and 64. It's just that much easier to separate them because it's not just CR that has to know what you are installing with all of the dependencies.

Kbase is not Forums.... use this link to get to our [Knowledge Base|] system...

Forums doesn't typically have links to our Kbases.

I have no idea what framework Classic is. There is the full build that for a WEB Site and it is selected by default as you have noted. For a Web App then you have the option to select the Client framework as well as CPU but CR requires the full 4.0 Framework as well as it has dependencies on the 2.0 framework.

A Web Site uses what ever it has as defined by the your WEB app pool and you install the CR run time as defined by the bit version of that pool. So if your app pool runs in 32 bit mode then you install the 32 bit CR runtime, if it runs in 64 bit then you install the 64 bit runtime.

So the reasons you have to manage it is because there are so many possibilities CR defaults to the generic one app one site install, it is done this way for simplicity to get you up and running. For deployment then you have to manage the configuration and how it gets deployed and various dependencies get moved around. Then you copy the CR viewer folder and manage the permissions. Kbase article explain all of this as well as Deployment guides.

Also be sure to search Microsoft's site on how to give your app pools access to printers running under the local system account.

Thank you

Don

PS - 2 people is not a common problem...

Edited by: Don Williams on Feb 7, 2011 10:16 AM

Former Member
0 Likes

In addition to Don's suggestions, [this|] forum thread is your best bet for a solution from where I look at this issue.

Also, see [this|] forum post.

- Ludek

Former Member
0 Likes

Ludek,

thanks

I tried to add those parameters in my web.config already and the patch for server 2003 is not my case.

I have server 2008 up to date.

Former Member
0 Likes

thank you don,

I will look more closely to the KB try to find something I haven't tried already and let you know.

The frustating thing is that looks like thare are so many possible causes.

In my opinion the CR error message should be much more descriptive to better identify the actual cause or better yet, the CR run-time has to be more intelligent to detect miss configurations.

Forget the 64-bit, everything is 32-bit, O/S are 32-bit and CR installed is for 32-bit of course.

Like I said before in VS2010 professional I don't have choice to select CPU nor 32/64 version it just says: Active CPU.

I can choose .NET2, should I make a test app specific for .NET 2? I will try that too.

BTW:

here is one entry in your KB talking about the classic version (which I tried already w/o success):

1203703 - Symptom

ASP.NET page using the Crystal Reports Viewer returns:

Error message: "BOBJ is undefined"

Reproducing the Issue

Crystal Reports 2008 SP1

VS.NET 2008

IIS 7

Resolution

Change the Application Pool to run in Classic mode

In IIS Manger, select the Application Pool and Basic Settings

Under Managed Pipeline Mode change from Integrated Mode to Classic Mode

0 Likes

Hello,

If you can't figure how to using the kbase articles and Forum posts then you have another option to [purchase a case|http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=38156200] and work with a SAP Rep to point you in the right direction...

Not much more we can do through forums for you.

Thank you

Don

Answers (2)

Answers (2)

Former Member
0 Likes

I had this error last week.

My setup is: Windows Server 2008, IIS7, Crystal Reports 2008

Resolved issue by copying the crystalreportviewers12 folder into the folder \asp_client\system_web\

I then put the the asp_client folder into the root folder of my application.

Maybe you've tried this already. I scanned post quickly.

Former Member
0 Likes

just wanted to let you know that FINALLY we found a solution for "BOBJ is undefined" in our particular case.

Former Member
0 Likes

I found that your problem,I'll wait for someone post solution.

and if you knew,please guide me also,Thanks for your advance.

Former Member
0 Likes

@naphong:

hi,

I just wanted to update you on my progress:

Unfortunately even creating a new project targeting .NET 2.0 doesn't work, I get the same bobj is undefined.

I'll keep you posted when I do more researches/tests.

PS - be nice. this is a PUBLIC forum and is not a Support system. To get a solution you have the option to work with a SAP Rep.

Edited by: Don Williams on Feb 7, 2011 1:32 PM

Former Member
0 Likes

just a note:

tried at home with a Windows 7, 32-bit machine, (no VS or any other IDE installed) and IE 9 beta and the web site CR works!!

With IE 9 beta you can actualy debug the website.

A tool similar to the one used by Chrome allows you to go into the jscript code and actually debug line by line.

I can debug into crv.js and at the very beginning the bobj object is nill so it gets created fine and from there everything else works 😮

So.. what the heck.

this demostrate once for all my web site and the web server are all configured right, the CR viewer folder is in fact found and the code works.

The question is now: why it doesn't work on Vista 32-bit machines with IE 8 ??!?!? (I tried on 2 different Vista machines both up to date with Microsoft patches)

Is IE configuration and permissions another thing to add to the already long list of possible things causing "BOBJ is undefined" ?

to be continue tomorrow at the office with the Vista machines..