Getting Javascript error with: $ create (Microsoft.Reporting.WebFormsClient.ReportViewer

We have a report viewer and it adds the following jscript to the aspx file:

//<![CDATA[
Sys.Application.add_init(function() {

if (typeof Microsoft == 'undefined' ||
    typeof Microsoft.Reporting == 'undefined' ||
    typeof Microsoft.Reporting.WebFormsClient == 'undefined' ||
    typeof Microsoft.Reporting.WebFormsClient.ReportViewer == 'undefined')
    Sys.UI.DomElement.setVisible($get('ReportViewer1_HttpHandlerMissingErrorMessage'), true);
    $create(Microsoft.Reporting.WebFormsClient.ReportViewer, {"_internalViewerId":"ReportViewer1_ctl03","id":"ReportViewer1"}, null, null);
});

But it keeps showing the script error “Microsoft is undefined” when it gets into

$create(Microsoft.Reporting.WebFormsClient.ReportViewer

lines. We just upgraded from Silverlight 3 / VS2008 to SL4 VS2010 - is there something missing?

+3
source share
3 answers

I get the same error. I followed the instructions at http://otkfounder.blogspot.com/2007/11/solving-reportviewer-rendering-issue-on.html but this did not solve the problem and I still get the error. Give him a chance, but it might work for you ...

+2

web.config system.web httpHandlers

  <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

, .

+2

  <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

to <httpHandlers> <system.web> ( ) , , , :

HTTP 500.22 -
ASP.NET, .

, :

<system.webServer>
  <handlers>
     <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  </handlers>
  ...

Web.config - . ReportViewer .

0

Source: https://habr.com/ru/post/1773821/


All Articles