Monday, July 19, 2010

SSRS Error - Report Server has encountered a SharePoint error (rsSharePointError) Get Online Help User cannot be found.

Reporting Services Error - Report Server has encountered a SharePoint error (rsSharePointError) Get Online Help User cannot be found.

Case 1: -
If the user (Author) of site is removed/deleted from the site collection. Or if We have restore the database to different server and the Author is not there in new environment . In that case this error is very common when the document library or site(that contains SSRS reports) is accessed.We get 'User not found exception' , as the following:

Unhandled Exception: Microsoft.SharePoint.SPException: User cannot be found.
at Microsoft.SharePoint.SPUserCollection.GetByID(Int32 id)
at Microsoft.SharePoint.SPWeb.get_Author()

Create a Console application and update the Author of site. like this

SPSite site = new SPSite("http://server:port");
SPWeb web = site.OpenWeb();
if (web.Author == null)
{ SPUser user = web.EnsureUser(@"domain\user");
web.Author = user;

Case 2: - Source -

When a SharePoint site is restored from a one domain to another, the users from the old domain get carried over to the new domain, even though the new machine does not know these users from the previous domain.When Report Server is involved, sometimes, this can result in an error as follows:
Report Server has encountered a SharePoint error. (rsSharePointError) Get Online Help User cannot be found.

Resolution :

  1. Open SQL Profiler and set up a trace on the target SharePoint Content DB (you can set a filter for DatabaseName)

  2. Start SQL Profiler trace.

  3. Open the ReportServer Site in a browser.

  4. Go back to the SQL Profiler Trace. You should see, somewhere, a string which looks like the following
    proc_SecGetPrincipalById GUID,INT_1,INT_2,INT_3
    GUID - of your Sharepoint site.
    INT_1 - user id in UserInfo table that cannot be found and has to be "really" deleted

  5. Run the following SQL against the SharePoint Content DB in question:
    SELECT * FROM UserInfo WHERE tp_SiteID = GUID AND tp_ID = INT_1

  6. If tp_Deleted = 1 you can set it to 0 with an UPDATE command:
    UPDATE UserInfo SET tp_Deleted = 0 where TP_Id = INT_1 AND tp_SiteID = GUID

  7. If the error persists, repeat steps 3 through 6 as there may be more than one old user carried across

No comments: