Showing a Dashboard in the WPF Viewer
Our sample projects and report templates can help you learn the basics of working with our products.This example demonstrates how to show dashboard in the WPF viewer. First, load a dashboard using
Then, use
Also, you can use
In the screenshot below you can see the result of the sample code:

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:
