I'm having a problem using the Telerik Reporting WPF ReportViewer control. I'm using Visual Studio 2017 v15.9.38 along with Telerik UI for WPF and Telerik Reporting v 15.2.21.915 (latest version). My application is targeting .NET 4.5.2.
In my application, I need to allow users to generate printed documents from system objects. For example, a Purchase Order. The user creates the Purchase Order, then needs to print it. I'm trying to use Telerik Reporting to do this, much like other applications use embedded Crystal Reports.
My application stores the reports as a byte array/varbinary in an MSSQL database. To test, I copied the sample Invoice report, and removed all data sources and everything except a simple line of text and image to make sure it renders. Later on I plan on adding data sources and binding those to internal system objects. My application handles the uploading of the report document and pulls it from the database and generates a Telerik.Reporting.InstanceReportSource before showing it.
Dim rsTelerik As New Telerik.Reporting.InstanceReportSource
Dim rPack As New Telerik.Reporting.ReportPackager
rsTelerik.ReportDocument = rPack.UnpackageDocument(New MemoryStream(MyByteArray))
This all seems to work fine. To display the report I have a custom control that hosts the Telerik ReportViewer and passes the ReportSource via DataBinding with a DependencyProperty. I've made it extremely simple just to test things.
<base:TBaseUserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:tr="http://schemas.telerik.com/wpf"
xmlns:localcontrols="clr-namespace:Redstone.Controls"
xmlns:base="clr-namespace:Redstone.Controls"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="400"
>
<tr:ReportViewer x:Name="rptViewer" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type base:CtrlTelerikReportBinding}}}">
<tr:ReportViewer.ReportSource>
<Reporting:InstanceReportSource x:Name="rsInstance"/>
</tr:ReportViewer.ReportSource>
</tr:ReportViewer>
</base:TBaseUserControl>
However the Visual Studio designer shows the ReportViewer control as a completely blank and transparent object. See attached screenshot. I've verified that I have references to both Telerik.Reporting and Telerik.ReportViewer.Wpf, and I verified that the References are set to copy local. I dragged and dropped the report control to let it create the references. I also verified that my Application.xaml has the Resource Dictionaries:
<ResourceDictionary x:Key="keuUI">
<ResourceDictionary.MergedDictionaries>
<ui:ThemeResources />
<ui:XamlControlsResources />
<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" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Both the VS designer and my application show the control as completely blank and transparent. See attached screenshot from the application. I tried uninstalling and re-installing the Telerik Reporting module, but still have the same issue. I get information in the Output window about the control loading and some warnings about a Telerik XML package, but no errors. I'm guessing that this is some kind of error with the References or DLLs since the designer won't show the control either. Any suggestions?