public abstract class ReportScheduleInfo
A ReportScheduleInfo object describes a specific Scheduler Service schedule job. It is a base class for the more specific classes:
public abstract class ReportScheduleInfo
newSchedule.SendReportInEmail = true; // Enable email newSchedule.EmailSubject = "Subject Text"; // Email subject newSchedule.EmailBody = "Hello World!"; // Email body newSchedule.EmailToList.Add("email@company.com"); // To addresses // newSchedule.EmailCCList.Add(); // CC addresses // newSchedule.EmailBccList.Add(); // BCC addresses
// Batch addresses entity (must be in the batch report) Entity batchAddresses = report.Entities.GetEntity("entityName"); newSchedule.IsBatchReport = true; // Enable batch newSchedule.BatchEmailToList.Add("supervisor@example.com"); // Summary recipients // newSchedule.BatchEmailCcList.Add(); // Summary cc recipients newSchedule.BatchEntity = batchAddresses.Name; // Email address object newSchedule.BatchField = batchAddresses.GetColumn("Email").Name; // Email address field newSchedule.IncludeReportAttachment = true; // Include the report
ReportScheduleInfo schedule = api.ReportScheduler.GetReportScheduleInfoByJobId("jobId");
api.ReportScheduler.UpdateExistingSchedule(newSchedule, "jobIdToUpdate");
api.ReportScheduler.DeleteSchedulerJob("jobIdToDelete");
List<Exception> exceptions; // Build the job list string string jobList = ""; foreach (List<JobInfo> schedule in api.ReportScheduler.GetJobList(out exceptions)) { foreach (JobInfo job in schedule.OrderBy(x => x.NextExecuteDate).ThenBy(x => x.Name)) { jobList += string.Format("Job '{0}' for report '{1}' ", job.Name, api.ReportScheduler.GetReportScheduleInfoByJobId(job.JobId.ToString()).ReportBaseName ); switch (job.Status) { case JobStatus.Completed: jobList += string.Format("ran on {0}, at host {1}.\n", job.LastExecuteDate.ToString("MMM d hh:mm tt"), api.ReportScheduler.GetHost(api.ReportScheduler.GetHostIdxForJob(job.JobId)) ); break; case JobStatus.Ready: jobList += string.Format("ready to run on {0}.\n", job.NextExecuteDate.ToString("MMM d hh:mm tt") ); break; case JobStatus.Deleted: case JobStatus.Removed: case JobStatus.Abended: case JobStatus.UserAbort: jobList += string.Format("ended. Last run on {0}, at host {1}.\n", job.LastExecuteDate.ToString("MMM d hh:mm tt"), api.ReportScheduler.GetHost(api.ReportScheduler.GetHostIdxForJob(job.JobId)) ); break; default: jobList += string.Format("status unknown.\n"); break; } } }
System.Object
WebReports.Api.Scheduler.ReportScheduleInfo
WebReports.Api.Scheduler.ReportScheduleInfoDaily
WebReports.Api.Scheduler.ReportScheduleInfoMonthly
WebReports.Api.Scheduler.ReportScheduleInfoOnce
WebReports.Api.Scheduler.ReportScheduleInfoWeekly
WebReports.Api.Scheduler.ReportScheduleInfoYearly