Hosting the Reports in a WPF Control

SSRS provides a component called ReportViewer that can be used to host (display) a report inside a Windows Forms control. Unfortunately, the control for WPF hasn't been created yet, so to display a report in WPF using the Windows Forms control you need to run the control in a special container that can provide forward compatibility between Windows Forms and WPF.

In WPF you can use a control of type WindowsFormsHost, which is available from the WindowsFormsIntegration.dll assembly provided with .NET 4. This control is a full, rich WPF control that provides tons of methods, events, and properties to fully integrate and host a Windows Forms control in a WPF control. The control can be used in your WPF XAML markup ...

Get Applied WPF 4 in Context now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.