Opens a dialog box that is used to set up export parameters in the regular report calculation task.
Command parameters are passed in the Data property. Executing the command requires to specify an array of the Variant type in this property, the elements of this array contain the following values:
Value type | Description |
Element 1: IPrxReport | The regular report, for which a regular report calculation task is set up. |
Element 2: String | The format that is used to save report calculation results. Available values:
|
Element 3: IPrxReportExporter | Export options. |
The command can be used only for regular report calculation tasks. Executing the command shows True if the OK button is clicked in the dialog box, and False if the Cancel button is clicked. If the OK button is clicked, changed export options are automatically saved in the task.
Executing the example requires that the repository contains a scheduled tasks container with the TASK_CONTAINTER identifier. The first task of the container calculates a regular report.
Sub UserProc;
Var
MB: IMetabase;
TaskContainer: IScheduledTasksContainer;
ReportTask: ICalculateReportScheduledTask;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Data: Array;
Begin
MB := MetabaseClass.Active;
TaskContainer := MB.ItemById("TASK_CONTAINTER").Bind As IScheduledTasksContainer;
ReportTask := TaskContainer.Tasks.Item(0).Bind As ICalculateReportScheduledTask;
Target := WinApplication.Instance.GetPluginTarget("Report");
Context := Target.CreateExecutionContext;
Data := New Variant[3];
Data[0] := ReportTask.SourceReport;
Data[1] := ReportTask.FormatTag;
Data[2] := New PrxReportExporter.Create;
Context.Data := Data;
Target.Execute("ShowExportPropSetup", Context);
End Sub UserProc;
On executing the example a dialog box opens that is used to set up export options for calculation task of a regular report. Export options are saved in the task after changing and clicking the OK button.
See also: