Dashboard: IUiDashboard;
The Source property determines a data source for the component.
Any component of UiDashboard can be used as a property value.
Executing the example requires a form with the Button1 button, the UiDashboard component named UiDashboard1, and the DashboardDocumentViewerBox component named DashboardDocumentViewerBox1. A dashboard with the Dashboard identifier is created in the repository. Add links to the Adhoc, Metabase system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Begin
MB := MetabaseClass.Active;
UiDashboard1.Report := MB.ItemById("Dashboard").Bind As IAdhocReport;
DashboardDocumentViewerBox1.Dashboard := UiDashboard1;
UiDashboard1.Active := True;
End Sub Button1OnClick;
On clicking the button the specified dashboard is displayed in the DashboardDocumentViewerBox1 component.
See also: