Solved

How can I use Reportviewer 2010 from Visual Studio 2013

Posted on 2015-01-21
10
546 Views
Last Modified: 2015-07-15
Hi
I'm using Visual Studio 2013 Premium. My users are on Server 2008. Which means I can't use ReportViewer 2012.
So I wish to use ReportViewer 2010, as that is the latest version support on Server 2008.

Within my project references, I added a reference to
C:\Program Files (x86)\Microsoft Visual Studio 9.0\ReportViewer\Microsoft.ReportViewer.WinForms.dll

However, the reportviewer component in the toolbar is still Version 11. And when I drag the component from the toolbar, I get the message below:

Error Message
Now I'm not sure how to proceed. How do I get the VS2010 version of report viewer into my project?
Thanks
0
Comment
Question by:jdhackett
  • 5
  • 5
10 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40564342
It doesn't look like you have version 10 installed, if you are adding a reference to version 9.
0
 
LVL 1

Author Comment

by:jdhackett
ID: 40566056
Good point. Though I am a bit confused on the versioning.
Microsoft.ReportViewer.WinForms.dll is in three locations on my PC
C:\Program Files (x86)\Microsoft Visual Studio 9.0 - Version 9
C:\Program Files (x86)\Microsoft Visual Studio 11.0\ReportViewer - Version 11
C:\Program Files (x86)\Microsoft Visual Studio 12.0\ReportViewer - Version 11

IF I click Help/About with VS2013, it states that it is version 12. So I thought that Version 9 was VS2010.

Anyway, how do I get the version 10 of ReportViewer? I tried installing the Microsoft Report Viewer 2010 Redistributable Package but this did not create a C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer folder.
So how would I get the correct dll?
Thanks
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40566684
These are just binary assemblies, so you should be able to use what ever version for the ReportViewer that you have installed.  I would go with 12.0\11.
0
 
LVL 1

Author Comment

by:jdhackett
ID: 40572973
But if I go with 12\11, I won't be able to publish to Server 2008.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40573262
Good point.  It gets messy when you have multiple versions installed, and you want to run the lower version.   If you select the reference in the Solution Explorer, what does it show as the version in the properties window?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 1

Author Comment

by:jdhackett
ID: 40575316
It shows 10 as the version.

References
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40575353
Is there something in the app.config to set assembly versions?

Example:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Open in new window

0
 
LVL 1

Author Comment

by:jdhackett
ID: 40577563
The app.config has very little info in it. The full app.config for my test report is below

<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
        <add name="SimpleReport_VS2013.My.MySettings.AdventureWorksConn" connectionString="Data Source=DEV01\DEV01_SQL2;Initial Catalog=AdventureWorks2008R2;Integrated Security=True" providerName="System.Data.SqlClient"/>
    </connectionStrings>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
</configuration>

Open in new window

0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 40577694
If you right click on the Toolbox, and select Choose Items, what version do you see for the ReportViewer in the dialog?

Choose Toolbox Items Dialog
1
 
LVL 1

Author Closing Comment

by:jdhackett
ID: 40883001
Sorry for the delay in coming back. The versions .Net versions was the key to this.
Thaks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now