简体   繁体   English

reportviewer 11无法正常工作Visual Studio 2012

[英]reportviewer 11 not working Visual studio 2012

I am using Visual Studio 2012 with Reportviewer 11 and nothing shows up at the run time. 我将Visual Studio 2012与Reportviewer 11一起使用,但运行时未显示任何内容。 I have checked the web.config file, Ref assemblies , IIS & setting (adding all the handlers and changing the app domain), added the assembly refrences on aspx page. 我已经检查了web.config文件,Ref Assembly,IIS和设置(添加了所有处理程序并更改了应用程序域),并在aspx页面上添加了程序集引用。 But still nothing comes up. 但是仍然没有任何结果。 When check the view source it says Report Viewer Configuration Error The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. 当检查视图源时,它说报告查看器配置错误报告查看器Web控件HTTP处理程序尚未在应用程序的web.config文件中注册。 Add to the system.web/httpHandlers section of the web.config file, or add to the system.webServer/handlers section for Internet Information Services 7 or later. 添加到web.config文件的system.web / httpHandlers部分,或添加到Internet Information Services 7或更高版本的system.webServer / handlers部分。

which I have already done :( 我已经完成了:(

It also gives me an error : Your browser does not support scripts or has been configured not to allow scripts. 这也给我一个错误:您的浏览器不支持脚本或被配置为不允许脚本。

Any Help appreciated . 任何帮助表示赞赏。 Thank you . 谢谢 。

Here is the code: 这是代码:

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


    <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
    <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>


<handlers>
  <remove name="WebServiceHandlerFactory-Integrated"/>
  <remove name="ScriptHandlerFactory"/>
  <remove name="ScriptHandlerFactoryAppServices"/>
  <remove name="ScriptResource"/>
  <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>
  <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>

</handlers>

Here is code behind: var query = (from p in db.PurchaseOrders where p.POID == yourValue select new { PurchaseOrderNumber = p.PurchaseOrderNumber, .......... 这是后面的代码:var query =(从db.PurchaseOrders中的p,其中p.POID == yourValue选择新的{PurchaseOrderNumber = p.PurchaseOrderNumber,..........

                         });

            ReportViewer1.LocalReport.ReportPath = "App_Data/POReport.rdlc";
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportDataSource rdS = new ReportDataSource("PODataset", query.ToList());
            ReportViewer1.LocalReport.DataSources.Add(rdS);
            ReportViewer1.DataBind();
            ReportViewer1.LocalReport.Refresh();

Here is the aspx code 这是aspx代码

   <br />

    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" AsyncRendering ="false">
        <LocalReport ReportEmbeddedResource="EDICheckerTest/App_Data/POReport.rdlc">

        </LocalReport>
    </rsweb:ReportViewer>

I have a similar problem. 我有一个类似的问题。 VS 2012 project with ms report. 带有ms报告的VS 2012项目。 Was working (using pdf and no viewer control) using version 10. Switched to version 11 over error messages when i attempted to add a viewer control. 在使用版本10时正在工作(使用pdf而没有查看器控件)。当我尝试添加查看器控件时,由于错误消息切换到了版本11。 Now it doesn't render, I just get the following message. 现在它没有渲染,我只收到以下消息。 However, the entry that is indicated in the message is already in web.config (pasted it under the entry that was already there and it matches char for char) 但是,消息中指示的条目已经在web.config中(将其粘贴到已经存在的条目下,并且将char与char匹配)

I did notice that even though both reportviewer.common and webforms are in my assembly cache, There is no reportviewer.common dll in my Visual Studio 11\\reportviewer folder. 我确实注意到,即使reportviewer.common和webforms都在我的程序集缓存中,但Visual Studio 11 \\ reportviewer文件夹中也没有reportviewer.common dll。

Report Viewer Configuration Error 报表查看器配置错误

The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. 报表查看器Web控件HTTP处理程序尚未在应用程序的web.config文件中注册。 Add to the system.web/httpHandlers section of the web.config file 添加到web.config文件的system.web / httpHandlers部分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM