This is a migrated thread and some comments may be shown as answers.

WPF ReportViewer throwing XamlParseException on initialisation

4 Answers 663 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 10 Feb 2014, 05:45 AM
Hi

I have a WPF project that uses the Q3 2013 SP1 telerik reporting and Telerik UI for WPF v2013.3.1316.45 binaries and am getting a XamlParseException when the ReportViewer control is initialised. 

The exception message and stack trace are as follows

"'The invocation of the constructor on type 'Telerik.ReportViewer.Wpf.ReportViewer' that matches the specified binding constraints threw an exception.' Line number '8' and line position '10'."

at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at ReportViewerTest.MainWindow.InitializeComponent() in c:\Users\PeterGleeson\Documents\VisualStudio2013\Projects\ReportViewerTest\ReportViewerTest\MainWindow.xaml:line 1
at ReportViewerTest.MainWindow..ctor() in
c:\Users\Peter Gleeson\Documents\Visual Studio 2013\Projects\ReportViewerTest\ReportViewerTest\MainWindow.xaml.cs:line 25

I have created a simple sample project that replicates the issue on my computer. In creating this project I took the following steps

1. included Telerik.Windows.Controls.dll, Telerik.Windows.Controls.Data.dll, Telerik.Windows.Controls.Input.dll, Telerik.Windows.Controls.Navigation.dll
2. In the MainWindow.xaml file I located the ReportViewer in the toolbox and dragged it onto the UI. This step automatically added Telerik.Reporting.dll and Telerik.ReportViewer.Wpf.dll.
3. Ran the project.

The project can be downloaded from (removed).

A quick response would be much appreciated as we have an upcoming release

Pete








4 Answers, 1 is accepted

Sort by
0
Aurelio Righetti
Top achievements
Rank 1
answered on 10 Feb 2014, 12:21 PM
Hi have the same error with last update Version 2013.3.1403.40 Rumtime Version v4.0.30319

0
Accepted
Aurelio Righetti
Top achievements
Rank 1
answered on 10 Feb 2014, 12:35 PM
Hi Peter, i have resolt the problem insert this in the app.config:
<runtime>
   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
     <dependentAssembly>
       <assemblyIdentity name="Telerik.Windows.Controls" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
       <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2013.3.1403.40"/>
     </dependentAssembly>
     <dependentAssembly>
       <assemblyIdentity name="Telerik.Windows.Controls.Input" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
       <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2013.3.1403.40"/>
     </dependentAssembly>
     <dependentAssembly>
       <assemblyIdentity name="Telerik.Windows.Controls.Navigation" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
       <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2013.3.1403.40"/>
     </dependentAssembly>
   </assemblyBinding>
 </runtime>
 it's work ok now..

Thanks
Aurelio
0
Stef
Telerik team
answered on 10 Feb 2014, 12:47 PM
Hello,

Indeed you need binding redirects, when you use greater version of the WPF assemblies than the default one. For more details check this forum discussion: Issue with Telerik Report Viewer.

@Peter: In future, please avoid posting projects including Telerik assemblies DEV version publicly. If you have an emergency question, use our ticketing system to reach our support staff and get response in a timely manner.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
Peter
Top achievements
Rank 1
answered on 11 Feb 2014, 01:40 AM
Thank you for the information guys, I have now fixed the bug.

Pete
Nadir
Top achievements
Rank 1
commented on 09 Feb 2023, 02:37 PM

I have the same problem.

i am using calender control but its thwoing exception in WPF desktop application.

Please help.

Martin Ivanov
Telerik team
commented on 14 Feb 2023, 07:39 AM

Do you mean the RadCalendar control? If so, can you post your question in the WPF forum with some additional details on the issue? Also, a runnable project will be very useful. 

In the meantime, you can double check if all required Telerik UI for WPF dlls are having the same version (example: 2022.3.1109). Then clean and rebuild the project and see if the error still occurs.
Tags
General Discussions
Asked by
Peter
Top achievements
Rank 1
Answers by
Aurelio Righetti
Top achievements
Rank 1
Stef
Telerik team
Peter
Top achievements
Rank 1
Share this question
or