One of the new features of SAP Crystal Reports for Visual Studio
2010 is the WPF Viewer. This control makes is easy to integrate your reports
into your WPF applications. You still get all the features of the viewer just
as if it were a WinForms or ASP.NET application. This article will create a WPF
application that uses the Entity Framework to populate a DataGrid control and
then also display the data in a Crystal Report.
Before you begin you will need to have installed Visual
Studio 2010. Crystal Reports is no longer distributed with Visual Studio and is
available as a separate download. You can download Crystal Reports here. You
also will need to download the AdventureWorks sample database from here. Once
you've installed the database you will need to create a SQL Login that the WPF
application can use to connect to the database. My sample code expects a SQL
Login to be called "aspalliance" with the password "aspalliance".
The sample code for this application can be downloaded here.