Printer: String;
Printer: String;
The Printer property determines the printer to be used to print a regular report after it is calculated.
As the value of this property, specify printer name as follows: <Server>\<Printer>.
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.
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: