Scenario:
While integrating ReportViewer 10.0.0.0 with SP2010 I faced an old issue
The base class includes the field 'ReportViewer1', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer).
As I hate to get into same problem again. Here's a list of things I tried to make it work.
Solution:
To understand the issue its a version mismatch issue. Check what's the latest version of ReportViewer ( Microsoft.Reporting.WebForms.dll) you have. On SP2010, its 10.0.0.0
If you are using any lower version i.e. 8.0.0.0 or 9.0.0.0 then you need to update it all places to avoid this.
Steps:
1. Check to make sure you don't have @Register directive pointing to old version. This you can do by searching '9.0.0.0' or '8.0.0.0' in complete project.
2. Clean the VS2010 solution and rebuild
3. Remove binary reference from Visual Studio project and add it again. Try Building it again
4. Check web.config to find you don't have entries pointing to old versions.
5. Sometime closing Project and opening it again helps
6. IISReset to ensure there are no caching issues with old versions
Sunday, January 15, 2012
Tuesday, May 3, 2011
Scenario:
We plan to use Report Viewer control in SharePoint for some reporting needs.
Solution:
It was a small challenge to make it work with SharePoint. Here's my experience ( error / resolutions )
Error 1 : The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> to the system.web/httpHandlers section of the web.config file.
Error was self explanatory. I was suppose to register new HTTPHandler to my web.config. Here's how it will look like after adding it.
<httpHandlers>I refreshed the screen and got
<remove verb="GET,HEAD,POST" path="*" />
<add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
Error 2 : The type 'Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' does not implement IReportViewerMessages
This was tricky but with some google helped me. I noticed 'ReportViewerMessages' under AppSettings. I removed it and error was gone.
I refreshed the screen and got
Error 3: Session state is disabled in web.config for SharePoint. The Report Viewer control requires that session state be enabled in local mode.
This was able straight forward. I enabledSessionState = true.
<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">Small update for SP2010
My good friend Clayton tried this on SP2010 but still got error related to session state not enable.
Running following command helped him.
Enable-SPSessionStateService –DefaultProvisionOne more thing > Don't make these changes to web.config directly but go for something which we have done. We have used a custom application page in layouts to host all the reports. Also we created a local web.config there and updated all these settings in there to reduce the impact to least.
Friday, September 25, 2009
Scenario:
Can we generate a list of documents checked out to anyone – a list of all checked out documents not just Checked Out To me
Steps ( MOSS only ) :
1. Navigate to Home > View All Site Content > Content and Structures Reports > Create a new report with following CAML Query
<Where><Geq><FieldRef Name="CheckoutUser" LookupId="TRUE"/><Value Type="int">0</Value></Geq></Where>
2. Navigate to Site Action > Manage Content and Structure > Change the view to All Checked Out documents ( from right side view drop down)
Monday, October 13, 2008
SharePoint Usage Reports
http://www.thesanitypoint.com/archive/2008/10/12/finding-buried-treasure-built-in-usage-reports-in-sharepoint-and-search-server.aspx
SharePoint Audit Reports
http://grounding.co.za/blogs/neil/archive/2008/04/09/auditing-and-audit-reports-in-a-sharepoint-site-collection.aspx
List Size Reporting
http://msmvps.com/blogs/shane/archive/2008/06/20/list-size-reporting.aspx
SharePoint Search Reports