Telerik Reporting R1 2017

How to: Add report viewer to a WPF application

The quickest way to add a WPF Report Viewer to your WPF project is with the Telerik Report Viewer Window item template.

Telerik Report Viewer Window Item Template

The item template is available in the Add New Item dialog box under the WPF category.

This item template will do the following:

  • Build the project and check that the project is using a compatible .NET version.

  • Open the Add New Report Viewer dialog to choose a report definition for the report viewer.

  • Verify that the project is having all the required references to Telerik UI for WPF and if a reference is missing it will ask you to add them according the Telerik Reporting license.

  • If missing add the required viewer styles for OfficeBlack theme in Themes\OfficeBlack directory.

  • Verify that the required styles are merged in the project App.xaml (Application.xaml for VB.NET).

  • If missing add the Telerik Reporting references (Telerik.Reporting, Telerik.ReportViewer.Wpf, Telerik.Reporting.XpsRendering).

  • Add a Window with WPF Report Viewer.

  • Setup the viewer's connection depending on selected engine type.

  • Show a summary log that list all of the made changes.

If the selected engine is of remote type (REST Service or Report Server), the item template will:

  • Add a reference to Telerik.Reporting.Services.HttpClient to the current project.

  • Add a reference to System.Net.Http and System.Net.Http.Formatting via NuGet package to the current project.

If the selected engine is REST Service additionally it will do the following:

  • Create a new web project that will host the REST service.

  • Register the provided REST service URL into IIS Express virtual directories list.

  • Register all the needed NuGet packages for the REST service.

  • Note Note

    In some cases the solution must be rebuilt in order to invalidate the NuGet packages and start the REST service project correctly.

See Also