Executing the example requires that the repository contains a workbook with the OBJ123 identifier for which the data display period and calendar order are changed.
Add links to the following system assemblies:
Express.
Metabase (only for Fore).
Sub UserProc;
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
MObj: IMetabaseObject;
Exp: IEaxAnalyzer;
WB: ILaner;
CalDim: ICalendarDimension;
Begin
MB := MetabaseClass.Active;
//Open a workbook to edit
MObj := MB.ItemById("OBJ123").Edit;
Exp := MObj As IEaxAnalyzer;
WB := Exp.Laner;
//Change calendar display period
WB.StartDate := DateTime.Parse("1990.02.01");
WB.EndDate := DateTime.Parse("2015.05.01");
//Set inverse order of calendar display
WB.ReverseOrder := True;
MObj.Save;
End Sub UserProc;
After executing the example a new period of data display is set, that is from February 1, 1990 to May 1, 2015. The inverse order of calendar display will be set.
The defined procedure is the Main entry point in the Program module of the .NET assembly. The Express, Metabase system assemblies must be imported to this module from the Prognoz.Platform.Interop system assembly.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
MObj: IMetabaseObject;
Exp: IEaxAnalyzer;
WB: ILaner;
Begin
MB := Params.Metabase;
//Open a workbook to edit
MObj := MB.ItemById["OBJ123"].Edit();
Exp := MObj As IEaxAnalyzer;
WB := Exp.Laner;
//Change calendar display period
WB.StartDate := DateTime.Parse("1990.02.01");
WB.EndDate := DateTime.Parse("2015.05.01");
//Set inverse order of calendar display
WB.ReverseOrder := True;
MObj.Save();
End Sub;
The result of example execution matches with that of the Fore example.
See also: