Target: IMetabaseObjectDescriptor;
The Target property determines a consumer object that will be replaced with a source object.
If the value of this property is specified, the values of properties are the ICubeMetaUpdateAdditionalObject.TargetId and the ICubeMetaUpdateAdditionalObject.TargetParent.
The value of this property is not saved on saving a copying object configured to copy a time series database from one repository to another. This property must be set after loading the copying object from file.
Executing the example requires that the repository contains a folder with the TARGET_FOLDER identifier, an express report with the TARGET_REPORT identifier, and express report with the OBJ_REPORT identifier, the only data source of which is the time series database with the FC_FROM identifier. Also add links to the Cubes, Metabase and Rds system assemblies.
Sub UserSub
Var
Mb: IMetabase;
Update: ICubeMetaUpdateEx;
CreateInfo: IMetabaseObjectCreateInfo;
Parent: IMetabaseObjectDescriptor;
Rubr: IRubricator;
Report: IMetabaseObjectDescriptor;
AdditionalObjs: ICubeMetaUpdateAdditionalObjects;
AddObj: ICubeMetaUpdateAdditionalObject;
Begin
Mb := MetabaseClass.Active;
Parent := Mb.ItemById("TARGET_FOLDER");
Update := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
Update.Metabase := Mb;
Rubr := Mb.ItemById("FC_FROM").Bind As IRubricator;
Update.Rubricator := Rubr;
CreateInfo := Update.CreateInfo;
CreateInfo.Parent := Parent;
CreateInfo.Id := "RUBR_REPL";
CreateInfo.Name := "RUBR_REPL";
Update.RdsDatabase := Rubr.Database;
AdditionalObjs := Update.AdditionalObjects;
Report := Mb.ItemById("OBJ_REPORT");
AddObj := AdditionalObjs.Add(Report);
AddObj.Target := Mb.ItemById("TARGET_REPORT");
Update.Apply(Null);
End Sub UserSub;
After executing the example the FC_FROM time series database is copied to the TARGET_FOLDER folder. The OBJ_REPORT report is copied together with the database to replace the report with the TARGET_REPORT identifier.
See also: