IAdhocSynchronization.Params

Syntax

Params: IAdhocParamSynchronization;

Description

The Params property returns the collection of links to synchronize parameters.

Comments

To work with synchronized dimensions, use the IAdhocSynchronization.Dimensions property.

Example

Executing the example requires that the repository contains a dashboard with the DASHBOARD_PARAMS identifier. The dashboard must contain two parametric data sources. Source parameters must be real or integer with the ITEM1 identifier.

Add links to the Adhoc, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Dashboard: IAdhocReport;
    Sync: IAdhocSynchronization;
    ParamSync: IAdhocParamSynchronization;
    i: Integer;
    ParamSyncInd: IAdhocParamSyncIndex;
    SyncParams: IAdhocSyncParams;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get dashboard
    Dashboard := mb.ItemById("DASHBOARD_PARAMS").Edit As IAdhocReport;
    // Get dashboard synchronization parameters     Sync := Dashboard.Synchronization;
    // Get links to synchronize parameters
    ParamSync := Sync.Params;
    // Remove all links
    For i := 0 To ParamSync.Count - 1 Do
        ParamSync.Remove(0);
    End For;
    // Add a link to synchronize parameters
    ParamSyncInd := ParamSync.Add("LINK");
    // Set link name
    ParamSyncInd.Name := "Parameter synchronization";
    // Get parameters included into the link
    SyncParams := ParamSyncInd.Params;
    // Add parameters to the link
    SyncParams.Add(Dashboard.DataSourceObjects.Item(0), "ITEM1");
    SyncParams.Add(Dashboard.DataSourceObjects.Item(1), "ITEM1");
    // Set parameter values in the link
    ParamSyncInd.Value := 4;
    If Not ParamSyncInd.AutoUpdate Then
        ParamSyncInd.Apply;
    End If;
    // Save changes
    (Dashboard As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the link to synchronize data sources parameters is created. A new value will be set and applied for parameters in the link.

See also:

IAdhocSynchronization