This example demonstrates how to show dashboard in the WPF viewer. First, load a dashboard using
Load()
method:
private StiReport GetTemplate()
{
var report = StiReport.CreateNewDashboard();
report.Load("Dashboards\\DashboardChristmas.mrt");
return report;
}
...
Then, use
ShowWithWpf()
to show dashboard in the viewer:
...
private void Button_Click_Dialog(object sender, RoutedEventArgs e)
{
var report = GetTemplate();
report.ShowWithWpf();
}
...
Also, you can use
ViewerControl
to show dashboard in necessary place:
...
private void Button_Click_Panel(object sender, RoutedEventArgs e)
{
ViewerControl.Report = GetTemplate();
}
In the screenshot below you can see the result of the sample code: