O'Reilly logo

Applied WPF 4 in Context by Raffaele Garofalo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required