SourceReport: IPrxReport;
The SourceReport property determines a calculated report.
The following example assumes that there are the Task object with the IScheduledTasksContainer type and the Report object with the IPrxReport type.
Sub UserProc;
Var
obj : IMetabaseObject;
Task : IScheduledTasksContainer;
Exe : ICalculateReportScheduledTask;
Report : IPrxReport;
Per : IScheduledTaskPeriodDaily;
Prop : IScheduledTaskProperties;
dat : DateTime;
Begin
obj := Task.Tasks.Item(0).Edit;
Exe := obj As ICalculateReportScheduledTask;
Exe.SourceReport := Report;
Prop := Exe.Properties;
Per := Prop.CreatePeriod(ScheduledTaskPeriodType.Daily) As IScheduledTaskPeriodDaily;
Per.StartDateTime := dat.AddMinutes(DateTime.Now, 2);
Prop.Period := Per;
Exe.FormatTag := "MHT";
obj.Save;
End Sub UserProc;
After executing the example parameters of report calculation task are changed in the task container.
See also: