on 03-19-2012 10:47 AM
Hi everyone,
I am developping a web application by using the ASP .NET MVC 3 framework.
I am using :
I have installed :
I have got the two following virtual directories under my default web site on IIS :
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.
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 :
http://localhost/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js
But the reference to the following CSS file is present and works :
http://localhost/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/style....
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.
Uninstall CR for VS 2010 SP1.
Install CR for VS 2010 SP2 on top of VS 2010.
Copy the 'Crystalreportviewers' folder from
C:\Program Files\Business Objects\Common\4.0\
location and paste it to (any framework targeted)
C:\Windows\Microsoft.NET\Framework\v3.5\ASP.NETClientFiles\
C:\Windows\Microsoft.NET\Framework\v2.0\ASP.NETClientFiles\
C:\Windows\Microsoft.NET\Framework\v4.0\ASP.NETClientFiles\.
and rename it to crystalreportviewers13.
If the application is running on IIS, Copy the ASPNet_Client folder from Inetpub/wwwroot to the application directory, make sure it has crviewers13 folder
For more information see this thread.
- Bhushan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have uninstalled CR for VS 2010 SP1.
Then, I have installed CR for VS 2010 SP2.
The latter installation put the crystalreportviewers13 folder into :
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ASP.NETClientFiles
So I did not copy/paste the crystalreportviewers folder from :
C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\Crystal Reports 2011
Then I have copied/pasted the following folder under the virtual directory of my web application :
C:\inetpub\wwwroot\aspnet_client
crystalreportviewers13 is a subfolder of aspnet_client.
But I am still facing the JavaScript error : "bobj is undefined".
Then I have written the following directives into my web.config file to help ASP .NET localizing my aspnet_client folder :
<configSections>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</sectionGroup>
</configSections>
<businessObjects>
<crystalReports>
<crystalReportViewer>
<add key="UseBrowserLocale" value="true"/>
<add key="resourceURI" value="~/aspnet_client/system_web/4_0_30319/crystalreportviewers13" />
</crystalReportViewer>
</crystalReports>
</businessObjects>
I have learned about the above directives from the CR .NET SDK Developper Guide.
But I am still facing the JavaScript error : "bobj is undefined".
Any help would be really appreciated.
I have tried to write the following directive into my web.config file :
<add key="resourceURI" value="~/crystalreportviewers13" />
instead of the following directive :
<add key="resourceURI" value="~/aspnet_client/system_web/4_0_30319/crystalreportviewers13" />
But a reference to the crv.js file is still not generated and I am still facing the JavaScript error : "bobj is undefined".
In addition the style.css file is not loaded anymore.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.