Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I use Reportviewer 2010 from Visual Studio 2013

Posted on 2015-01-21
10
Medium Priority
?
1,167 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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
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
 
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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

963 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