Solved

How can I use Reportviewer 2010 from Visual Studio 2013

Posted on 2015-01-21
10
726 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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

807 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