ICalculateReportScheduledTask.ReadResult

Syntax

ReadResult(TaskResult: IScheduledTaskResult; [Report: IPrxReport = Null]): IPrxReport;

Parameters

TaskResult. Container task.

Report. The report, to which the result of task calculation must be loaded.

Description

The ReadResult method gets the result of task calculation in the form of a report and enables the user to load the result to the specified report.

Comments

This method is used if the format for saving the result of task calculation has not been specified. Format for saving is specified in the FormatTag property.

Example

The following example assumes that there are a Rep object with the IPrxReport type, a Task object with the IScheduledTasksContainer type and a UiReport1 object with the UiReport type.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Mb: Imetabase;

Pare: IMetabaseObject;

Task : IScheduledTasksContainer;

RepTask: ICalculateReportScheduledTask;

Rep: IPrxReport;

Begin

 

RepTask := Task.Tasks.Item(0).Bind As ICalculateReportScheduledTask;

Rep := RepTask.ReadResult(RepTask.GetResults.Item(0));

If Rep = Null Then

WinApplication.InformationBox("No result.");

Else

UiReport1.Instance := Rep;

End If;

End Sub Button1OnClick;

After clicking the button the UiReport1 component displays the result of task execution.

See also:

ICalculateReportScheduledTask