WPF ReportViewer throwing XamlParseException on initialisation

5 posts, 1 answers
  1. Peter
    Peter avatar
    6 posts
    Member since:
    Jan 2013

    Posted 09 Feb 2014 Link to this post

    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








  2. Aurelio Righetti
    Aurelio Righetti avatar
    51 posts
    Member since:
    May 2009

    Posted 10 Feb 2014 Link to this post

    Hi have the same error with last update Version 2013.3.1403.40 Rumtime Version v4.0.30319

  3. DevCraft banner
  4. Answer
    Aurelio Righetti
    Aurelio Righetti avatar
    51 posts
    Member since:
    May 2009

    Posted 10 Feb 2014 Link to this post

    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
  5. Stef
    Admin
    Stef avatar
    3047 posts

    Posted 10 Feb 2014 Link to this post

    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.

  6. Peter
    Peter avatar
    6 posts
    Member since:
    Jan 2013

    Posted 10 Feb 2014 in reply to Stef Link to this post

    Thank you for the information guys, I have now fixed the bug.

    Pete
Back to Top
DevCraft banner