ICalculateReportScheduledTask.PutExportSettings

Syntax

PutExportSettings(Exporter: IPrxReportExporter);

Parameters

Exporter. The parameter determines export parameter settings.

Description

The PutExportSettings method enables the user to save export parameter settings to the task of regular report calculation in the task container.

Example

    Sub Main;
    Var
        prop: IScheduledTaskProperties;
        period: IScheduledTaskPeriodOneTimeOnly;
        CrInfo: IMetabaseObjectCreateInfo;
        MObj: IMetabaseObject;
        ex: ICalculateReportScheduledTask;
        exporter: IPrxReportExporter;
        report: IPrxReport;
    Begin
        report := MB.ItemById("OBJ29714").Bind As IPrxReport;
        CrInfo := MB.CreateCreateInfo;
        CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_TASK_CALCULATEREPORT;
        CrInfo.Id := "Report_calculator1";
        CrInfo.Name := "Report calculation task 1";
        CrInfo.Parent := MB.ItemById("OBJ29709");
        MObj := MB.CreateObject(CrInfo).Edit;
        Ex := MObj As ICalculateReportScheduledTask;
        ex.SourceReport := report;
        ex.FormatTag := "xls";
        prop := Ex.Properties;
        prop.AppendAttachment:=False;
        period := (prop.CreatePeriod(ScheduledTaskPeriodType.OneTimeOnly) As IScheduledTaskPeriodOneTimeOnly);
        period.StartMode := TaskPeriodOneTimeStartMode.Immediate;
        prop.Period := period;
        prop.MailAddress:= "test@mail.com";
        Exporter := New PrxReportExporter.Create;
        exporter.Report := report;
        exporter.ExportChartsAsImages := True;
        ex.PutExportSettings(exporter);
        Mobj.Save;              
    End Sub Main;

Executing the example creates a task of regular report calculation named Report Calculation Task 1, and export parameter settings are loaded to the task.

See also:

ICalculateReportScheduledTask