CopyDataSourceObject(Source: IAdhocDataSourceObject): IAdhocDataSourceObject;
None;
Source. The data source to be copied.
The CopyDataSourceObject method creates a copy of the specified data source.
The created copy stores all data source settings.
Executing the example requires that the repository contains a workbook with the DASHBOARD_COPYOBJ identifier that contains several blocks.
Add links to the Adhoc, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Dashboard: IAdhocReport;
DsObj, CopyDsObj: IAdhocDataSourceObject;
Begin
mb := MetabaseClass.Active;
Dashboard := mb.ItemById("DASHBOARD_COPYOBJ").Edit As IAdhocReport;
DsObj := Dashboard.DataSourceObjects.Item(0);
CopyDsObj := Dashboard.CopyDataSourceObject(DsObj);
(Dashboard As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the dashboard first data source copy is created.
See also: