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; } } } }); } } }