ParamValues: IMetabaseObjectParamValues;
None;
The ParamValues property returns a collection of data source parameter values.
On setting up the ParamValues value, a dependent object reopens, all dimensions are rebuilt.
Executing the example requires that the repository contains the DASHBOARD_PARAMS dashboard.
Add links to the Adhoc, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Dashboard: IAdhocReport;
DsObjs: IAdhocDataSourceObjects;
i, j: Integer;
DsObj: IAdhocDataSourceObject;
ParamValues: IMetabaseObjectParamValues;
ParamVal: IMetabaseObjectParamValue;
Begin
// Get current repository
mb := MetabaseClass.Active;
// Get dashboard
Dashboard := mb.ItemById("DASHBOARD_PARAMS").Bind As IAdhocReport;
// Get dashboard data sources
DsObjs := Dashboard.DataSourceObjects;
// Look over data sources
For i := 0 To DsObjs.Count - 1 Do
DsObj := DsObjs.Item(i);
// Get values of data source parameters
ParamValues := DsObj.ParamValues;
If ParamValues.Count = 0
Then Debug.WriteLine("Data source " + DsObj.Object.Name + " does not contain parameters");
Else Debug.WriteLine("Data source " + DsObj.Object.Name + ":");
End If;
// Look over parameters values
For j := 0 To ParamValues.Count - 1 Do
ParamVal := ParamValues.Item(j);
Debug.WriteLine(" - parameter: " + ParamVal.Name);
Debug.WriteLine(" - value: " + ParamVal.Value);
End For;
End For;
End Sub UserProc;
After executing the example the console window displays parameter values for dashboard data sources.
See also: