INSTALLATION & CONFIGURATION

If you like to know what and how to manually tweak the ReportViewer for MVC library then this section is for you.

Let NuGet handle all work

The easiest (and recommended) way of installing the library is by installing it through NuGet.

Go to ReportViewer for MVC and install the package on your project by running the following command on the package manager console:

PM> Install-Package ReportViewerForMvc

Dependencies

ReportViewer for MVC have some dependencies in order to work correctly. Fortunately, the NuGet package is already configured to install all of them for you.

ReportViewer for MVC assemblies

A reference for the ReportViewerForMvc assembly will be added on your project.

Microsoft.ReportViewer.WebForms

The following code get’s installed on the Web.config, this will take care of running the ReportViewer control on your web pages:

<configuration>

    <system.web>
        <httpHandlers>
            <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>
    </system.web>
	
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <handlers>
            <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>
    </system.webServer>
	
</configuration>

ReportViewerWebForm.aspx

This web form is used as a placeholder of the ReportViewer object. This file is added on your project root folder.

Last edited Mar 16, 2015 at 1:04 AM by armanio123, version 2