Progress® Telerik® Reporting R3 2018

Manual Setup

This article explains the steps needed to manually create an application which uses the WPF report viewer. Another way to add a WPF Report Viewer to your application

  1. Create a new WPF Application project in Visual Studio.

    Note Note

    .NET Framework 4 Client Profile is not supported.

  2. Add references to the following Telerik UI for WPF NoXaml assemblies:

    • Telerik.Windows.Controls.dll

    • Telerik.Windows.Controls.Input.dll

    • Telerik.Windows.Controls.Navigation.dll

    • Telerik.Windows.Data.dll

    In case you are still not prepared to migrate to Implicit Styling you can use the binaries that include the xaml. However you will still have to merge all the xaml files mentioned in the next step, otherwise the Report Viewer will not show up as it will have no style.

    In case you use Telerik UI for WPF only for the report viewer, you can use Telerik UI for WPF assemblies that we provide with the local demos. They are internally unlocked for the WPF Report Viewer but can only be used with the report viewer. The Telerik UI for WPF assemblies are located in %programfiles(x86)%\Progress\Reporting R3 2018\Examples\CSharp\WpfDemo\bin).

    The WPF ReportViewer is build with the latest official release of Telerik UI for WPF. In this way we provide trouble free upgrade for most of the users. This means that you can use the latest version of Telerik UI for WPF in your project and report viewer.

    It is possible that the Telerik UI for WPF assemblies have a greater version (service pack or internal build) than the one with which the WPF report viewer control is build. In this case you have to add appropriate assembly binding redirects (see Binding Redirects topic bellow).

    Note Note

    The assemblies that are part of Telerik Reporting are the Telerik.ReportViewer.Wpf.dll and Telerik.ReportViewer.Wpf.Themes.dll.

  3. The Telerik UI for WPF xaml files are located in %programfiles(x86)%\Progress\Reporting R3 2018\Wpf\Themes).

  4. The next step is to merge these ResourceDictionaries in the App.xaml file:

    <Application x:Class="WpfApplication1.App"
                    <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/System.Windows.xaml" />
                    <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/Telerik.Windows.Controls.xaml" />
                    <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/Telerik.Windows.Controls.Input.xaml" />
                    <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/Telerik.Windows.Controls.Navigation.xaml" />
                    <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/Telerik.ReportViewer.Wpf.xaml" />

    For the above sample we have used the Fluent theme. The WPF Report Viewer supports all the Telerik UI for WPF themes. In order to style the viewer with another theme, change the above XAML snippet Fluent with the desired theme name.

  5. Drag and drop the ReportViewer control from the toolbox in a WPF window. If the ReportViewer is not available in the toolbox, you can add it using the instructions from the How to add the WPF ReportViewer to the toolbox topic bellow.

  6. Add reference to Telerik.Reporting.dll in your project.

    Make sure that the project have reference to Telerik.ReportViewer.Wpf.Themes.dll.

  7. Set the ReportSource for the report viewer. For more information, see How to: Set ReportSource for Report Viewers. This can be done either declaratively or programmatically:

    • Specifying a report source declaratively, we would use type report source for this example:

      <Window x:Class="WpfApplication1.Window1"
          Title="Window1" Height="451" Width="683" 
              <telerik:ReportViewer Name="reportViewer1">
                      <telerikReporting:TypeReportSource TypeName="Telerik.Reporting.Examples.CSharp.BarcodesReport, CSharp.ReportLibrary" />
    • Setting a report source at run time. The following code snippet illustrates how to assign a report source to the WPF ReportViewer in the Window.Loaded event handler:

      <Window x:Class="WpfApplication1.Window3"
          Title="Window3" Height="328" Width="618" xmlns:my="clr-namespace:Telerik.ReportViewer.Wpf;assembly=Telerik.ReportViewer.Wpf" Loaded="Window_Loaded">
              <my:ReportViewer Name="reportViewer1" />
      namespace WpfApplication1
          using System.Windows;
          /// <summary>
          /// Interaction logic for Window3.xaml
          /// </summary>
          public partial class Window3 : Window
              public Window3()
              private void Window_Loaded(object sender, RoutedEventArgs e)
                  var typeReportSource = new Telerik.Reporting.TypeReportSource();
                  typeReportSource.TypeName = "Telerik.Reporting.Examples.CSharp.ListBoundReport, CSharp.ReportLibrary";
                  this.reportViewer1.ReportSource = typeReportSource;

Binding Redirects

In case you use Telerik UI for WPF version greater than the latest official release(service pack or internal build) you have to redirect all assemblies required by the Telerik WPF ReportViewer to their latest versions. To do this, add the following bindingRedirects to your app.config and replace the "2010.1.421.35" with the exact version of Telerik UI for WPF assemblies:

<?xml version="1.0" encoding="utf-8" ?>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Telerik.Windows.Controls" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
        <bindingRedirect oldVersion="" newVersion="2010.1.421.35"/>
        <assemblyIdentity name="Telerik.Windows.Controls.Input" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
        <bindingRedirect oldVersion="" newVersion="2010.1.421.35"/>
        <assemblyIdentity name="Telerik.Windows.Controls.Navigation" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
        <bindingRedirect oldVersion="" newVersion="2010.1.421.35"/>
Note Note

Redirecting Assembly Versions is a standard .NET technique for resolving assembly versions conflicts. Visual Studio 2013 allows automatic binding redirects. For more details check MSDN: How to: Enable and Disable Automatic Binding Redirection.

How to add the WPF ReportViewer to the toolbox

  1. Select a WPF window file (e.g. Window1.xaml).

  2. Open the toolbox and add your own tab or click on the General tab.

  3. Right click in the selected tab area and select Choose Items… from the context menu.

  4. The previous step will open Choose Toolbox Items dialog. Select the WPF Components tab and find the ReportViewer component from the Telerik.ReportViewer.Wpf assembly.

  5. Click OK

See Also

In this article
Not finding the help you need?