Reporting and WPF controls cannot reference eachother

9 posts, 0 answers
  1. Paul
    Paul avatar
    108 posts
    Member since:
    Jun 2010

    Posted 22 Jan 2014 Link to this post

    I just downloaded Telerik Reporting and also the Telerik controls for WPF.  The WPF controls are 2013.3.1204.40.  The reporting controls are Q3 2013 7.2.13.1016.  When I attempt to open a report, the Telerik ReportViewer constructor throws an error:

    Could not load file or assembly 'Telerik.Windows.Controls, Version=2013.3.1016.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Telerik.Windows.Controls, Version=2013.3.1016.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7"

    Well of course it can't load the 1016 version since I have 1204.  I downloaded these directly from the site.  Why are the versions out of sync?  How can I fix this?
  2. Paul
    Paul avatar
    108 posts
    Member since:
    Jun 2010

    Posted 22 Jan 2014 Link to this post

    Update - Although I messed with this for quite some time without a solution, as soon as I posted the question I figured out the binding redirects and got this working.

    But this seems like a very bad solution to me.  I'll get errors next time I update.  Can't the reporting controls be built so that they don't require a specific version?  Or some other solution?
  3. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 24 Jan 2014 Link to this post

    Hello Paul,

    The WPF ReportViewer uses RadControls for WPF in its template, still Telerik Reporting does not require you to purchase both products. The viewer of a specific major Q release is built against the corresponding release of the WPF assemblies, and we ship trial version of these WPF assemblies, which are internally unlocked when used with the viewer.

    In cases you use both products, the above approach allows you to upgrade them separately in the frame of a Q release by adding the binding redirects to the configuration. Then on upgrade you will need to run both Upgrade Wizards and manually edit the configuration file with the bindings.

    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.

  4. Paul
    Paul avatar
    2 posts
    Member since:
    Apr 2013

    Posted 25 Jan 2014 in reply to Stef Link to this post

    Yes I have just got this issue.  I am still evaluating Telerik.

    Things like this, it would be nice to have some information on the Telerik site.  I guess using WPF and Reporting in the same application is not uncommon.  I have never done any Binding redirects, now I have to quickly put something together.  Not good when under pressure.

    Can we please make this information easily accessible Telerik.

    Thanks

    Paul
  5. Paul
    Paul avatar
    2 posts
    Member since:
    Apr 2013

    Posted 25 Jan 2014 in reply to Paul Link to this post

    After some digging around, and excruciating trial and error, I finally sorted this.  Add the following to the App.config file:

    <configuration>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Telerik.Windows.Controls"
              publicKeyToken="5803cfa389c90ce7"
              culture="neutral" />
            <bindingRedirect oldVersion="2013.3.1016.40" newVersion="2013.3.1204.45" />
            <publisherPolicy apply="no" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>

    Hope this helps someone else!

    Paul
  6. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 27 Jan 2014 Link to this post

    Hello Paul,

    This information can be found in the How to: Add report viewer to a WPF application help article. With the upcoming release the article will be updated to include more details on the topic.

    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.

  7. Aung
    Aung avatar
    1 posts
    Member since:
    Apr 2017

    Posted 23 May 2017 in reply to Stef Link to this post

    Hello Admin, is it possible to add telerik report into WPF User Control?
  8. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 25 May 2017 Link to this post

    Hi Aung,

    You can use the WPF ReportViewer - How to: Add report viewer to a WPF application or Manual Setup.
    You can also directly print and export Telerik reports via ReportProcessor.

    Regards,
    Stef
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  9. Jorge
    Jorge avatar
    1 posts
    Member since:
    Jan 2018

    Posted 03 Feb 2018 in reply to Paul Link to this post

    Thanks Paul!!!
Back to Top