ICalculateReportScheduledTask.Printer

Fore Syntax

Printer: String;

Fore.NET Syntax

Printer: String;

Description

The Printer property determines the printer to be used to print a regular report after it is calculated.

Comments

As the value of this property, specify printer name as follows: <Server>\<Printer>.

Fore Example

Executing the example requires that the repository contains a scheduled tasks container with the TASK_CONTAINTER identifier. The first task of the container calculates regular report. The local network must also contain the print server PrinSrv, to which a printer named HP_Floor1 is connected.

Sub UserProc;
Var
    MB: IMetabase;
    TaskContainer: IScheduledTasksContainer;
    CalcReportTask: ICalculateReportScheduledTask;
Begin
    MB := MetabaseClass.Active;
    TaskContainer := MB.ItemById("TASK_CONTAINTER").Bind As IScheduledTasksContainer;
    CalcReportTask := TaskContainer.Tasks.Item(0).Edit As ICalculateReportScheduledTask;
    CalcReportTask.Printer := "PrinSrv\HP_Floor1";
    (CalcReportTask As IMetabaseObject).Save;
End Sub UserProc;

On executing the example parameters of the task of regular report calculation are changed. After executing the task the calculated report will be printed on the specified printer.

Fore.NET Example

Executing the example requires that the repository contains a scheduled tasks container with the TASK_CONTAINTER identifier. The first task of the container calculates regular report. The local network must also contain the print server PrinSrv, to which a printer named HP_Floor1 is connected. This procedure is an entry point of a .NET assembly.

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    TaskContainer: IScheduledTasksContainer;
    CalcReportTask: ICalculateReportScheduledTask;
Begin
    MB := Params.Metabase;
    TaskContainer := MB.ItemById["TASK_CONTAINTER"].Bind() As IScheduledTasksContainer;
    CalcReportTask := TaskContainer.Tasks.Item[0].Edit() As ICalculateReportScheduledTask;
    CalcReportTask.Printer := "PrinSrv\HP_Floor1";
    (CalcReportTask As IMetabaseObject).Save();
End Sub;

On executing the example parameters of the task of regular report calculation are changed. After executing the task the calculated report will be printed on the specified printer

See also:

ICalculateReportScheduledTask