locked
Error - The Name rptViewer.ProcessingMode does not exist in the Current Text. RRS feed

  • Question

  • User1979860870 posted

    Hi

     Following this link - https://techbrij.com/ssrs-report-asp-net-mvc-app

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    using SSRS.Models;
    using Microsoft.Reporting.WebForms;
    
    namespace SSRS.Controllers
    {
        public class ReportController : Controller
        {
            ReportViewer rptViewer = new ReportViewer();
            rptViewer.ProcessingMode = ProcessingMode.Remote;
            rptViewer.SizeToReportContent = true;
            rptViewer.ZoomMode = ZoomMode.PageWidth;
            rptViewer.Width = Unit.Percentage(99);
            rptViewer.Height = Unit.Pixel(1000);
            rptViewer.AsyncRendering = true;
            rptViewer.ServerReport.ReportServerUrl = new Uri("http://localhost/ReportServer/");
            rptViewer.ServerReport.ReportPath = this.SetReportPath();
            ViewBag.ReportViewer = rptViewer;
            return View();
        }
    }

    <dependentAssembly>
            <assemblyIdentity name="Microsoft.ReportViewer.WebForms" publicKeyToken="89845dcd8080cc91" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
          </dependentAssembly>

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

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

    <appSettings>
        <add key="webpages:Version" value="3.0.0.0" />
        <add key="webpages:Enabled" value="false" />
        <add key="ClientValidationEnabled" value="true" />
        <add key="UnobtrusiveJavaScriptEnabled" value="true" />
        <add key="ReportPath" value="/MyReports"/>
      </appSettings>

    Thanks

    Thursday, February 11, 2021 5:03 AM

Answers

  • User1686398519 posted

    Hi jagjit saini, 

    Have you installed Microsoft.ReportViewer.WebForms?

    You can check your reference. You can use NuGet to install missing packages.

    Best Regards,

    YihuiSun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 12, 2021 3:22 AM