Exporter: IExportRequestParams;
Exporter: Prognoz.Platform.Interop.Cubes.IExportRequestParams;
The Exporter property returns parameters of factors export.
To execute the example, add links to the Metabase and Cubes system assemblies. Executing the example requires a time series database with the FC_AUTO identifier that contains an export object with the OBJ_EXPORT identifier.
Sub UserProc;
Var
MB: IMetabase;
RubKey: Integer;
ExpParams: IExportRequestParams;
ExpPeriod: IRubricatorAutoPeriod;
ExpPeriodDate: IRubricatorAutoPeriodDate;
ExportRequestInst: IExportRequestInstance;
Begin
// Receive export object
MB := MetabaseClass.Active;
RubKey := MB.GetObjectKeyById("FC_AUTO");
ExportRequestInst := MB.ItemByIdNamespace("OBJ_EXPORT", RubKey).Open(Null) As IExportRequestInstance;
// Edit export parameters
ExpParams := ExportRequestInst.Exporter;
ExpPeriod := ExpParams.AutoPeriod;
ExpPeriodDate := ExpPeriod.Start;
ExpPeriodDate.AutoDateType := RubricatorAutoDateType.Exact;
ExpPeriodDate.ExactDate := DateTime.Parse("01.01.2000");
ExpPeriodDate := ExpPeriod.End_;
ExpPeriodDate.AutoDateType := RubricatorAutoDateType.Now;
ExpPeriodDate.Offset := -2;
MB.ItemByIdNamespace("OBJ_EXPORT", RubKey).Save;
// Export
ExportRequestInst.Export;
End Sub UserProc;
After executing the example factors are exported using the OBJ_EXPORT export object. Export periods are changed:
Period start: 01.01.2000.
Period end: the current date shifted to two points backward.
To execute the example, add links to the Metabase and Cubes system assemblies. Executing the example requires a time series database with the FC_AUTO identifier that contains an export object with the OBJ_EXPORT identifier.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Cubes;
...
Sub UserProc(Params: StartParams);
Var
MB: IMetabase;
RubKey: uinteger;
ExpParams: IExportRequestParams;
ExpPeriod: IRubricatorAutoPeriod;
ExpPeriodDate: IRubricatorAutoPeriodDate;
ExportRequestInst: IExportRequestInstance;
Begin
// Receive export object
MB := Params.Metabase;
RubKey := MB.GetObjectKeyById("FC_AUTO");
ExportRequestInst := MB.ItemByIdNamespace("OBJ_EXPORT", RubKey).Open(Null) As IExportRequestInstance;
// Edit export parameters
ExpParams := ExportRequestInst.Exporter;
ExpPeriod := ExpParams.AutoPeriod;
ExpPeriodDate := ExpPeriod.Start;
ExpPeriodDate.AutoDateType := RubricatorAutoDateType.radtExact;
ExpPeriodDate.ExactDate := DateTime.Parse("01.01.2000");
ExpPeriodDate := ExpPeriod.@End;
ExpPeriodDate.AutoDateType := RubricatorAutoDateType.radtNow;
ExpPeriodDate.Offset := -2;
MB.ItemByIdNamespace("OBJ_EXPORT", RubKey).Save();
// Export
ExportRequestInst.Export();
End Sub UserProc;
After executing the example factors are exported using the OBJ_EXPORT export object. Export periods are changed:
Period start: 01.01.2000.
Period end: the current date shifted to two points backward.
See also: