IAdhocReport.CopyDataSourceObject

Fore Syntax

CopyDataSourceObject(Source: IAdhocDataSourceObject): IAdhocDataSourceObject;

Fore.NET Syntax

None;

Parameters

Source. The data source to be copied.

Description

The CopyDataSourceObject method creates a copy of the specified data source.

Comments

The created copy stores all data source settings.

Fore Example

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:

IAdhocReport