Once I deployed a web application on the production machine, to my dismay I noticed that Crystal Reports could not turn up. I checked the runtimes installed on my machine, references in my project(s) & web.config file. I redeployed my application, however could not find the answer to “Why the reports would not turn up?”
I started cursing ‘gremlins’ for this, as everything was working on my development machine. This is one of the most common errors which users usually face while they try to access the crystal reports through the web page.
Following are the symptoms of the error:
- The Blank Page appears in the browser when a .NET Web application is run.
- The title of the browser becomes “Untitled Page”.
- The status bar of the browser shows “Done, but with errors on page” or “Done” with yellow (!) exclamation mark.
- When the user clicks on the yellow (!) exclamation mark, Internet Explorer dialog box shows error: “Problem with this Web page might prevent it from being displayed properly or functioning properly. In the future, you can display this message by double-clicking the warning icon displayed in the status bar.”
- Error : ‘bobj’ is undefined.
There are few reasons which lead to this error:
- Missing “crystalreportviewers12” folder in the custom website.
- Application pool is running under Integrated mode when IIS 7 is used.
- Wrong value assigned to the key called “resourceURI” .
- The error ‘bobj Undefined’ occurs in development machine as the .NET Framework could not find the files needed by Crystal Report Viewer at the specified location in the Windows folder.
Following are the solutions to the above scenarios:
- Copy the folder “crystalreportviewers12″ from “C:Inetpubwwwrootsystem_web2_0_50727” under “Default Website” to the “Custom Website” directory in IIS. Or, create a virtual directory pointing ‘aspnet_client’ folder in the custom web site directory.
- In the IIS Manger, select the Application Pool and Basic Settings. Under Managed Pipeline Mode, change Integrated Mode to Classic Mode.
- The value of resoureURI should be “~/crystalreportviewers12” not “/crystalreportviewers12”.
- Copy the CrystalReportViewers12 folder from
“C:Program FilesBusiness ObjectsCommon4.0” and paste it to “C:WindowsMicrosoft.NETFrameworkv3.5ASP.NETClientFiles”.
Note: Framework may vary as per the Visual Studio version used.
This blog targets Crystal Reports 2008 (12.x) but can be applied to other versions of Crystal Reports as well. If there are any other scenarios which lead to error, they can be brought to notice by adding a comment with the resolution (if any). Please do not forget to ask questions on the SAP Crystal Reports, version for Visual Studio. If this does not help, please consider purchasing the single case.
Additional Resources (SAP Knowledge Base Articles):
- 1203703 – Error: “‘Bobj’ is undefined” occurs while deploying ASP.NET 2.0 with Crystal Reports 2008 application.
- 1278952 – ASP.NET Error “BOBJ is undefined”.
- 1183065 – Error: “Done, but with errors on page” on a blank web page when viewing Crystal Report 2008 in a Visual Studio .NET 2005 Web application.