when I try to open a report is shows Microsoft JScript runtime error: 'Sys.Application' is null or not an object
If I click Ignore or Continue, it's show the report properly, but when I deploy it to the development server it does not work.
At this time I am trying to open a simple report with the date and page number.
there is a CrystalReportViewer at the Default.aspx page.
the code is
Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Me.CrystalReportViewer1.ReportSource = New Report_Test
End If
End Sub
End Class
I have the same problem when using a crystal report viewer in vs2010. I have tried to modify the crv.js files as you did but when I run the application I get the same error as before. Looking at the script in VS at run time it looks like it is not picking
up the changes I made. The files I have tried to modify are the following:
I tried all possible solutions which appeared on the net for the Microsoft runtime JS errors encountered during execution of Crystal Reports. But None of them worked. Finally I hit upon the idea of trying a full postback on Submit Button for viewing the
report. It just did wonders. All reports there on worked beautifully with data getting refreshed with new data on each submit as per report parameter values submitted.
If you are using AJAX, attach Full PostBack trigger to the Submit Button.
guizn
Member
4 Points
13 Posts
Crystal Report Error - VS2010
Aug 05, 2010 09:07 AM|LINK
Hi guys,
The problem is in the crv.js, at
Sys.Application.notifyScriptLoaded();
when I try to open a report is shows Microsoft JScript runtime error: 'Sys.Application' is null or not an object
If I click Ignore or Continue, it's show the report properly, but when I deploy it to the development server it does not work.
At this time I am trying to open a simple report with the date and page number.
there is a CrystalReportViewer at the Default.aspx page.
the code is
Public Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then Me.CrystalReportViewer1.ReportSource = New Report_Test End If End Sub End ClassThanks
guizn
Member
4 Points
13 Posts
Re: Crystal Report Error - VS2010
Aug 06, 2010 06:27 AM|LINK
to fixed that i've changed in the original file
if(typeof(Sys)!=='undefined') {
Sys.Application.notifyScriptLoaded();
}
for
if(typeof(Sys.Application)!=='undefined') {
Sys.Application.notifyScriptLoaded();
}
RyanDansie
Member
2 Points
1 Post
Re: Crystal Report Error - VS2010
Aug 07, 2010 10:06 PM|LINK
I have the same problem when using a crystal report viewer in vs2010. I have tried to modify the crv.js files as you did but when I run the application I get the same error as before. Looking at the script in VS at run time it looks like it is not picking up the changes I made. The files I have tried to modify are the following:
C:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers14\js\crviewer\crv.js
C:\Program Files\SAP BusinessObjects\Crystal Reports 14.0\crystalreportviewers\js\crviewer\crv.js
C:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers12\js\crviewer\crv.js
C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers14\js\crviewer\crv.js
I am launching the application from within visual studio. What was the location of the file you edited?
guizn
Member
4 Points
13 Posts
Re: Crystal Report Error - VS2010
Aug 09, 2010 12:42 AM|LINK
Hi RyanDansie,
I edited all of them, but the one that made effect was
C:\Program Files\SAP BusinessObjects\Crystal Reports 14.0\crystalreportviewers\js\crviewer\crv.js
Edit all of those, close all aplications, open the files in notepad, change them and save ... that's how I did, It's working properly now.
suresh_panem
Member
2 Points
1 Post
Re: Crystal Report Error - VS2010
Dec 01, 2011 05:45 PM|LINK
I tried all possible solutions which appeared on the net for the Microsoft runtime JS errors encountered during execution of Crystal Reports. But None of them worked. Finally I hit upon the idea of trying a full postback on Submit Button for viewing the report. It just did wonders. All reports there on worked beautifully with data getting refreshed with new data on each submit as per report parameter values submitted.
If you are using AJAX, attach Full PostBack trigger to the Submit Button.