Solved

Microsoft ReportViewer in Sharepoint

Posted on 2011-03-10
5
1,044 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

695 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