The WPF based report Viewer control. The WPF Viewer control is used to preview report documents.
The following example shows how to create a Viewer instance in XAML: The following example shows how to load a report into the Viewer in code-behind: For more information on customizing the WPF Viewer, see the
documentation page.
<Window x:Class="MyNamespace.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:viewer="clr-namespace:GrapeCity.ActiveReports.Viewer.Wpf;assembly=GrapeCity.ActiveReports.Viewer.Wpf"
Title="MainWindow" Height="450" Width="800">
<Grid>
<viewer:Viewer x:Name="reportViewer" />
</Grid>
</Window>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
reportViewer.LoadDocument("path/to/your/report.rdlx");
}
}