Dashboard: IUiDashboard;
Dashboard: Prognoz.Platform.Interop.AdHoc.UiDashboard;
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.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.AdHoc;
Imports Prognoz.Platform.Interop.Metabase;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
MB: IMetabase;
Begin
MB := Self.Metabase;
UiDashboardNet1.Report := MB.ItemById["Dashboard"].Bind() As IAdhocReport;
DashboardDocumentViewerBoxNet1.Dashboard := UiDashboardNet1;
UiDashboardNet1.Active := True;
End Sub;
See also: