Solved

How can I use Reportviewer 2010 from Visual Studio 2013

Posted on 2015-01-21
10
631 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to error 4 44
SQL syntax in VB.net 5 29
how to read json value 2 30
Where can I ask about my ASP.NET MVC project? 6 19
Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

910 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

20 Experts available now in Live!

Get 1:1 Help Now