Deploying on SharePoint Overview
This is a legacy report viewer and for new projects our recommendation is to use the latest WebForms Report Viewer - HTML5 Web Forms Report Viewer
This topic outlines the required steps that need to be taken to deploy the web ReportViewer prior to implementing it within an existing MOSS
web site.
First you need to install
Telerik.Reporting.dll
andTelerik.ReportViewer.WebForms.dll
in theGAC (Global Assembly Cache)
of your SharePoint server. For more information please refer to How to: Install an Assembly into the Global Assembly Cache-
Next you should tell SharePoint that the Reporting assemblies are safe to use. To do so you should add a few
<SafeControl>
entries within the<SafeControls>
section of yourweb.config
:<SafeControl Assembly="Telerik.Reporting, Version=x.x.x.xxxx, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.Reporting" TypeName="" Safe="True" /> <SafeControl Assembly="Telerik.ReportViewer.WebForms, Version=x.x.x.xxxx, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.ReportViewer" TypeName="" Safe="True" />
-
In order for the report viewer to function properly, you need to register its handler in the
<system.web>
/<httpHandlers>
section in theweb.config
:<add path="Telerik.ReportViewer.axd" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=x.x.x.x, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" verb="*" validate="true" />
When the application is hosted on IIS 7+, the handler of the report viewer should be registered in the
<system.webServer>
/<handlers>
section as well:<add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=x.x.x.x, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode" />
-
Open the page where you want to add the ReportViewer control (e.g. e.g.
default.master
) and if prompted to check out the file select “Yes”. Now you need to register theTelerik.ReportViewer.WebForms
assembly in the master page. Do so by adding the following directive:<%@ Register TagPrefix="telerik" Namespace="Telerik.ReportViewer.WebForms" Assembly="Telerik.ReportViewer.WebForms, Version=x.x.x.xxxx, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" %>
The version of an assembly is specified in each
<SafeControl>
tag. Make sure that you input the correct version you use before proceeding.The ReportViewer uses the session state to preserve the report instance assigned to its Report property during page postbacks and for some other design reasons as well. Thus have in mind that you should enable session state on your SharePoint server.