Hello,
I'm attempting to create a CRUD interface for SSRS schedules. When I attempt to clear out the end date I get this error. I have set a breakpoint and inspected the ScheduleDefinition object that I am sending, and essentially EndDate = DateTime.MinValue and EndDateSpecified = false.
Attempting to work around this problem I've also set EndDate to DateTime.MaxValue, but that seems to cause it to actually save EndDate and set EndDateSpecified to true despite the debugger showing EndDateSpecified = false when I inspect it just before the web method call.
Here is the full error:
System.Web.Services.Protocols.SoapException: The schedule definition contains an invalid date. The valid date range is between 1/1/1990 and 12/31/9999. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ScheduleDateTimeRangeException: The schedule definition contains an invalid date. The valid date range is between 1/1/1990 and 12/31/9999. at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition, Guid batchId) at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition) at Microsoft.ReportingServices.WebServer.ReportingService2010.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The schedule definition contains an invalid date. The valid date range is between 1/1/1990 and 12/31/9999. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ScheduleDateTimeRangeException: The schedule definition contains an invalid date. The valid date range is between 1/1/1990 and 12/31/9999. at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition, Guid batchId) at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition) at Microsoft.ReportingServices.WebServer.ReportingService2010.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition) Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SoapException: System.Web.Services.Protocols.SoapException: The schedule definition contains an invalid date. The valid date range is between 1/1/1990 and 12/31/9999. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ScheduleDateTimeRangeException: The schedule definition contains an invalid date. The valid date range is between 1/1/1990 and 12/31/9999. at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition, Guid batchId) at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition) at Microsoft.ReportingServices.WebServer.ReportingService2010.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition)] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1787189 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +345 NMCDataCenter.Utilities.ReportingService.ReportingService2010.SetScheduleProperties(String Name, String ScheduleID, ScheduleDefinition ScheduleDefinition) in C:\Users\...\Documents\Visual Studio 2010\Projects\NMCDataCenter.Utilities\NMCDataCenter.Utilities\Web References\ReportingService\Reference.cs:3169 NMCDataCenter.Utilities.Reporting.Schedule.UpdateSchedule(Schedule schedule) in C:\Users\...\Documents\Visual Studio 2010\Projects\NMCDataCenter.Utilities\NMCDataCenter.Utilities\Reporting\Schedule.cs:219 NMCDataCenter.ReportViewer.Controls.ScheduleManager.SaveForm(Object sender, DirectEventArgs e) in C:\Users\...\Documents\Visual Studio 2010\Projects\NMCDataCenter.ReportViewer\NMCDataCenter.ReportViewer\Controls\ScheduleManager.ascx.cs:251 Ext.Net.ResourceManager.RaisePostBackEvent(String eventArgument) +1055 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Any idea what I'm doing wrong or perhaps an example of the proper way to clear EndDate?
Thanks in advance!