Solved

Microsoft ReportViewer in Sharepoint

Posted on 2011-03-10
5
1,037 Views
Last Modified: 2012-05-11
I have a creating a .aspx page in VS2008 with a reportviewer control and a .rdlc report file with the data coming from a DataSet.XSD file. This report is connecting to a SQL server.  When i run the page on my development machine everything works great.  But when i place the file in the web directory inside sharepoint it gives me this error:

The control type 'Microsoft.Reporting.WebForms.ReportViewer' is not allowed on this page. The type is not registered as safe.

I added the assembly Microsoft.Reporting.WebForms to the web.config file in the web directory.  I also added the SafeControl tag for the assemly.
 <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

<SafeControl Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" TypeName="*" Safe="True" AllowRemoteDesigner="True"/>
When i added the safecontrol tag the page gives me this error:
This page has encountered a critical error. Contact your system administrator if this problem persists.

Are there other steps i need to do inorder to get the report viewer to work on a sharepoint page??
0
Comment
Question by:Muralidharand
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 35103082
Well for one a typical ASP.NET page won't run natively in SharePoint.  Was there a web link that convinced you this would work?
0
 
LVL 1

Accepted Solution

by:
Muralidharand earned 0 total points
ID: 35196885
I have added the Reportviewer control in the safe controls and it is started working....
0
 
LVL 1

Author Comment

by:Muralidharand
ID: 35196892
Please review
0
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 35200212
Be aware that with an upgrade or even update to SharePoint your manual changes to the web.config file can be wiped out.  SharePoint likes to *own* the configuration files and DLL's used in the installation.
0
 
LVL 1

Author Closing Comment

by:Muralidharand
ID: 35229997
We have to add Reportviewer control in the safe control list in sharepoint web.config file.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question