Solved

Microsoft ReportViewer in Sharepoint

Posted on 2011-03-10
5
998 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
  • 3
  • 2
5 Comments
 
LVL 51

Expert Comment

by:tedbilly
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:tedbilly
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

A question that is asked often, is how to generate sequential numbers in InfoPath Forms. The best way to achieve this is to use a SQL database, along with a stored procedure and a web service to connect Forms Services to the DB. The first thing t…
When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now