Progress® Telerik® Reporting R3 2020

WPF ReportViewer Troubleshooting

The article provides troubleshooting for commonly met issues with the WPF ReportViewer control.

The WPF ReportViewer displays content rendered through the Reporting WPF XAML Rendering mechanism that produces XAML loaded by the control.

The viewer throws a MethodAccessException

When connecting the WPF Report Viewer to Telerik Report Server or Telerik Reporting REST API Service, the following exception may occur:

Attempt by method 'Telerik.Reporting.Services.HttpClient.HttpRequestHelper.GetResponseFromPost(System.Net.Http.HttpResponseMessage)'
to access method 'Telerik.Reporting.Services.HttpClient.HttpRequestHelper.GetResponseFromPost<T>
(System.Net.Http.HttpResponseMessage, System.Collections.Generic.IEnumerable`1<System.Net.Http.Formatting.MediaTypeFormatter>)' failed.

The most common reason for this exception is an incorrect version of the web client assemblies. The viewer requires the Microsoft.AspNet.WebApi.Client NuGet package. It can be installed The assemblies required by the viewer .NET4 that can be installed via Visual Studio NuGet Package Manager or Visual Studio Package Manager Console. For more details, please check the following article: How To: Use WPF Report Viewer with Report Server.

The WPF ReportViewer is not visible on running the application.

As of Telerik Reporting Q1 2014, the WPF ReportViewer control uses implicit styles. When the viewer's template (Telerik.ReportViewer.Wpf.xaml) file is not loaded correctly, the viewer is not displayed. Double-check if XAML resources are loaded in the application.

More details about the settings required by the WPF ReportViewer are available in WPF ReportViewer: Manual Setup.

The WPF application cannot be built.

In some cases the application build process fails with the following or a similar message, related to XAML resources:

The name "XYZControl" does not exist in the namespace "clr-namespace:Telerik.XXXX;assembly=Telerik.XXXX". [path]\Themes\[theme_name]\Telerik.XXXX.xaml.

This message can appear after upgrading to a newer version of Telerik Reporting or when the styles applied to the WPF Report Viewer are not implicit. As of Telerik Reporting Q1 2014, the WPF ReportViewer control uses implicit styles. When the viewer's template (Telerik.ReportViewer.Wpf.xaml) file is not loaded correctly, the viewer is not displayed. Also if the additionally required XAML files are not loaded or they are not of a version synchronized with Telerik Reporting, you may receive such errors. Double-check if XAML resources are loaded in the application and if dependencies between Telerik Reporting and Telerik UI for WPF are considered - WPF Dependenices per release.

More details about the settings required by the WPF ReportViewer are available in WPF ReportViewer: Manual Setup.

Telerik Reporting Upgrade Wizard will update only references to Telerik Reporting assemblies and configuration settings. You will have to manually update the related Telerik.ReportViewer.Wpf.xaml files, and Telerik UI for WPF XAML files distributed by Telerik Reporting. This includes manual update of Telerik UI for WPF assemblies distributed by Telerik Reporting.

If you use Telerik UI for WPF as a separate product, you can run Telerik UI for WPF Upgrade Wizard which will update Telerik UI for WPF assembly references and XAML resources automatically.

"Cannot resolve dependency to assembly 'Telerik.Windows.XXXX...'." error on running the application.

The WPf ReportViewer control is built against a specific version of Telerik UI for WPF on each official release. Please check the dependencies for the used Telerik Reporting version - WPF Dependenices per release. You can update assembly references accordingly or add binding redirect.

More details about the settings required by the WPF ReportViewer are available in WPF ReportViewer: Manual Setup.

The report in the WPF ReportViewer is messed or different than the design-time preview.

The WPF ReportViewer displays the report rendered in XAML format. External styles may affect the produced XAML that contains standard elements like Canvas, TextBlock and etc. Test excluding styles to check if they change the displayed content, or test exporting in a format like PDF.

In this article
Not finding the help you need?