OutputStartDate: DateTime;
OutputStartDate: System.DateTime;
The OutputStartDate property determines data loading start date.
To set data loading end date, use the ILanerTransformPeriod.OutputEndDate property.
Executing the example requires that the repository contains a workbook with the WB_OUTPUT identifier that contains one or several calculated series.
Add links to the Express, Laner and Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
ErAn: IEaxAnalyzer;
Laner: ILaner;
Series: ILanerSeries;
i: Integer;
Serie: ILanerCalculateSerie;
Period: ILanerTransformPeriod;
Begin
// Get current repository
mb := MetabaseClass.Active;
// Get workbook
ErAn := mb.ItemById("WB_OUTPUT").Edit As IEaxAnalyzer;
Laner := ErAn.Laner;
// Get all series in the workbook
Series := Laner.Series;
// Start parsing series
For i := 0 To Series.Count - 1 Do
Serie := Series.Item(i) As ILanerCalculateSerie;
// If a series is calculated, set data loading period for it
If Serie.Kind = LnSerieKind.Calculate Then
Period := Serie.TransformPeriod;
Period.OutputStartDate := DateTime.Parse("01.01.2005");
Period.OutputEndDate := DateTime.Parse("01.01.2017");
End If;
End For;
// Save changes
(ErAn As IMetabaseObject).Save;
End Sub UserProc;
After executing the example a data loading period is set for all calculated series in the workbook.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Laner;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
ErAn: IEaxAnalyzer;
Laner: ILaner;
Series: ILanerSeries;
i: Integer;
Serie: ILanerCalculateSerie;
Period: ILanerTransformPeriod;
Begin
// Get current repository
mb := Params.Metabase;
// Get workbook
ErAn := mb.ItemById["WB_OUTPUT"].Edit() As IEaxAnalyzer;
Laner := ErAn.Laner;
// Get all series in the workbook
Series := Laner.Series;
// Start parsing series
For i := 0 To Series.Count - 1 Do
Serie := Series.Item[i] As ILanerCalculateSerie;
// If a series is calculated, set data loading period for it
If Serie.Kind = LnSerieKind.lskCalculate Then
Period := Serie.TransformPeriod;
Period.OutputStartDate := DateTime.Parse("01.01.2005");
Period.OutputEndDate := DateTime.Parse("01.01.2017");
End If;
End For;
// Save changes
(ErAn As IMetabaseObject).Save();
End Sub;
See also: