Show Reports Teleriks in project asp mvc gives error

0

Good afternoon, I have a project in asp mvc 5, with razor views, which I am trying to show some reports of teleriks that I already have facts, and they are in the Content folder, however, I am giving many problems and errors .

Like this: Parser Error Message: Could not load file or assembly 'Telerik.ReportViewer.WebForms, Version = 7.0.13.220, Culture = neutral, PublicKeyToken = a9d7983dfcc261be' or one of its dependencies. The system can not find the specified file.

I've been trying to follow the steps in this tutorial

link

Here is my web config, in the handlers part

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
      <remove name="Telerik.ReportViewer.axd_*"/>
      <add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type ="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.0.13.220, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode"/>
    </handlers>
  </system.webServer>

And the part of the view that I have been trying to configure without success (I added an asp webform in the root of the project, to work with aspx)

<%@ Import Namespace="SSMS_2._0._1.Content" %>

<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=7.0.13.220, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>

<%@ Register assembly="Telerik.Reporting, Version=7.0.13.220, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
namespace="Telerik.Reporting" tagprefix="telerik" %>


<form id="main" method="post" action="">
 <telerik:ReportViewer ID="ReportViewer1" Width="100%" Height="800px" runat="server">
 </telerik:ReportViewer>
</form>

<script runat="server">
 public override void VerifyRenderingInServerForm(Control control)
  {
 // to avoid the server form (<form runat="server"> requirement
  }
 protected override void OnLoad(EventArgs e)
  {
 base.OnLoad(e);
      var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
      instanceReportSource.ReportDocument = new Dashboard();
      ReportViewer1.ReportSource = instanceReportSource;
  }
</script>

Until now I have arrived and I have been looking for the solution for days, any help would be welcome, thanks

    
asked by Ricardo Rios 10.04.2016 в 03:07
source

2 answers

0

What I should do, was to update the project with the teleriks tools, which sent all the necessary resources so that the reportviewer could be seen, however, now I have problems with the parameters, here the other question, to close this

Como add parameters to a telerik reportviewer by code since the wizard does not work

    
answered by 11.04.2016 / 04:32
source
0

You must validate that the dll Telerik.ReportViewer.WebForms.dll is in the bin folder of the website where you deploy.

If you check Telerik's documentation he mentions it

Deploying Web Applications

  

During the installation of Telerik Reporting on your machine, the Telerik assemblies were added to GAC. When deploying a Web Application project the assemblies from the GAC are not copied automatically so you need to make sure the assemblies physically exist in the bin folder of your application

You could also validate that the option Copy Local of the dll is in true

If I know that in the image you will see other dll, but it is only an example so that you find the option to which I refer.

    
answered by 10.04.2016 в 05:35