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

Reporting and WPF controls cannot reference eachother

8 Answers 133 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 22 Jan 2014, 07:23 PM
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?

8 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 22 Jan 2014, 07:26 PM
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?
0
Stef
Telerik team
answered on 24 Jan 2014, 10:34 AM
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.

0
Paul
Top achievements
Rank 1
answered on 25 Jan 2014, 01:49 PM
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
0
Paul
Top achievements
Rank 1
answered on 25 Jan 2014, 02:21 PM
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
0
Stef
Telerik team
answered on 27 Jan 2014, 09:27 AM
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.

0
Aung
Top achievements
Rank 1
answered on 23 May 2017, 10:11 PM
Hello Admin, is it possible to add telerik report into WPF User Control?
0
Stef
Telerik team
answered on 25 May 2017, 02:25 PM
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
0
Jorge
Top achievements
Rank 1
answered on 03 Feb 2018, 08:38 PM
Thanks Paul!!!
Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Stef
Telerik team
Paul
Top achievements
Rank 1
Aung
Top achievements
Rank 1
Jorge
Top achievements
Rank 1
Share this question
or