SharePoint 2010 - SSRS 2010 ReportingService2010.CreateSubscri ption Error: User cannot be found.
Not sure if this is the right place for my question\issue but here goes. Have a Sharepoint 2010 installation with SQL 2008 R2 reporting services in integrated mode. I havea webpart that copies a template site and its rpeorts, then fixes the reports for the new site (rs.ListChildren) I then need to create some subscriptions on those reports, but I am getting the following error: FAILED: <errorcode xmlns="http://www.microsoft.com/sql/reportingservices">rsDeliveryError</errorcode><httpstatus xmlns="http://www.microsoft.com/sql/reportingservices">400</httpstatus><message xmlns="http://www.microsoft.com/sql/reportingservices">A subscription delivery error has occurred.</message><helplink xmlns="http://www.microsoft.com/sql/reportingservices">http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsDeliveryError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=10.50.2500.0</helplink><productname xmlns="http://www.microsoft.com/sql/reportingservices">Microsoft SQL Server Reporting Services</productname><productversion xmlns="http://www.microsoft.com/sql/reportingservices">10.50.2500.0</productversion><productlocaleid xmlns="http://www.microsoft.com/sql/reportingservices">1033</productlocaleid><operatingsystem xmlns="http://www.microsoft.com/sql/reportingservices">OsIndependent</operatingsystem><countrylocaleid xmlns="http://www.microsoft.com/sql/reportingservices">1033</countrylocaleid><moreinformation xmlns="http://www.microsoft.com/sql/reportingservices">ReportingServicesLibrary<message msrs:ErrorCode="rsDeliveryError" msrs:HelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsDeliveryError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=10.50.2500.0" xmlns:msrs="http://www.microsoft.com/sql/reportingservices">A subscription delivery error has occurred.</message><moreinformation>Microsoft.SharePoint<message>User cannot be found.</message></moreinformation></moreinformation><warnings xmlns="http://www.microsoft.com/sql/reportingservices"></warnings> If I am able to a rs.ListSubscriptions on another site and retrieve subscription settings but if I try to create a subscription this is what I am getting. Any ideas? Oh BTW I am able to create DataSources following the same process, sucessfully. using System; using Microsoft.SharePoint; using Microsoft.SqlServer.ReportingServices2010; using System.Net; using System.Web; using System.Text; using System.IO; using System.Collections.Generic; using System.Diagnostics; using System.Web.Services; using System.Web.Services.Protocols; namespace TPG.ProjectInit { class Sample_Subscription { private void SetupSubscriptions() { SPSecurity.RunWithElevatedPrivileges(delegate { using (SPSite siteColl = new SPSite(SPContext.Current.Site.ID)) { using (SPWeb web = siteColl.OpenWeb("MySite/Reports")) { if (web.Exists) { String shortSiteURL = String.Empty; web.AllowUnsafeUpdates = true; try { ReportingService2010 reportingWS = new ReportingService2010(); reportingWS.Credentials = CredentialCache.DefaultCredentials; string report; ExtensionSettings extSettings; string desc; string eventType; string scheduleXml; string matchData; DateTime startDateTime = DateTime.UtcNow; ParameterValue[] extensionParams = null; #region sample subscription ReportingService2010 rs = new ReportingService2010(); rs.Credentials = System.Net.CredentialCache.DefaultCredentials; report = "http://MyServer/MySite/Reports/Sales Order Detail.rdl"; desc = "Send to Document Library"; eventType = "TimedSubscription"; scheduleXml = @"<ScheduleDefinition>" + " <StartDateTime>2003-02-24T09:00:00-08:00" + " </StartDateTime>" + " <WeeklyRecurrence>" + " <WeeksInterval>1</WeeksInterval>" + " <DaysOfWeek>" + " <Monday>True</Monday>" + " </DaysOfWeek>" + " </WeeklyRecurrence>" + "</ScheduleDefinition>"; extensionParams = new ParameterValue[6]; extensionParams[0] = new ParameterValue(); extensionParams[0].Name = "RENDER_FORMAT"; extensionParams[0].Value = "EXCEL"; extensionParams[1] = new ParameterValue(); extensionParams[1].Name = "FILENAME"; extensionParams[1].Value = "Sales Order Detail"; extensionParams[2] = new ParameterValue(); extensionParams[2].Name = "FILEEXTN"; extensionParams[2].Value = "True"; extensionParams[3] = new ParameterValue(); extensionParams[3].Name = "PATH"; extensionParams[3].Value = "http://MyServer/MySite/Reports/"; extensionParams[4] = new ParameterValue(); extensionParams[4].Name = "WRITEMODE"; extensionParams[4].Value = "Overwrite"; extensionParams[5] = new ParameterValue(); extensionParams[5].Name = "AUTOCOPY"; extensionParams[5].Value = "False"; matchData = scheduleXml; extSettings = new ExtensionSettings(); extSettings.ParameterValues = extensionParams; extSettings.Extension = "Report Server DocumentLibrary"; try { rs.CreateSubscription(report, extSettings, desc, eventType, matchData, null); } catch (SoapException e) { Debug.WriteLine(e.Detail.InnerXml.ToString()); } #endregion //sample subscription } catch (Exception ex) { Debug.WriteLine("FAILED: " + ex.Message); return; } } else { Debug.WriteLine("FAILED: Site does not exist"); return; } } } }); } } }
July 6th, 2012 10:23am

Hello, Thank you for your post. This is a quick note to let you know that we are performing research on this issue. Thanks,Pengyu Zhao TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 9th, 2012 5:21am

We are using the Sharepoint Library. Yes the account has permissions to Add items. Since we are using SP Elevated privileges it would be the SharePoint account. We opened a ticket with Microsoft but they are also at a loss as to a way to accomplish this, apparently when the Reporting Services API was written it did not account for this. One suggestion was to HARD Code the credentials and re-authenticate to the Report Server (NOT!). So we are still looking for an answer, another suggestion has been to recontruct the soap headers, I am assuming this means the same way that the PSI API had to be done prior to WCF, but have not had any luck with that approach either. Still looking.
September 8th, 2012 9:44am

Hi Bob, Sorry for the delay due to an unexpected issue. Which type of delivery extension do you use when creating the subscription, the E-mail Delivery or SharePoint Library Delivery? If you configure the subscription to use the SharePoint Library Delivery, please make sure the user have Add Items permission on the library to which the report is delivered. For more information, please see: Set Permissions for Report Server Items on a SharePoint Site If the subscription uses the E-mail Delivery extension, I suggest that you check whether the E-mail delivery has been configuration correctly. For more information, please see Configure a Report Server for E-Mail DeliveryHow to: Create and Manage Subscriptions (Reporting Services in SharePoint Integrated Mode) Hope this helps. Regards, Mike Yin Mike Yin TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2012 1:03am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics