Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There was requirement for generating reports using Microsoft Report Viewer in local mode. I have used MS Report Viewer 2005 i.e. by referencing Microsoft.ReportViewer.WinForms.dll and Microsoft.ReportViewer.Common.dll with 8.0.0.0 version. The reports are getting generated fine if there is Microsoft Report viewer 2005 installed in my machine, but doesn't generate if Microsoft Report viewer 2010 is installed.

So is there any way that I ll reference to one assembly version and reports will work for all its higher versions.

Or is there any way where i can reference the same assembly name but different version.

Or which is the best way to solve this problem.
Posted

What language are you using? What version of Visual Studio?

I am referencing Microsoft.ReportViewer.WinForms.dll in my C# project.

What error message do you get and when?
 
Share this answer
 
What language are you using?
I am using C#

What version of Visual Studio?
Visual Studio 2010
I am using .Net framework 3.5.

What error message do you get and when?
I would like to put it in this way,
I have used MS Report Viewer 2005 i.e. by referencing Microsoft.ReportViewer.WinForms.dll and Microsoft.ReportViewer.Common.dll with 8.0.0.0 version. Here i am not referencing to 10.0.0.0 version.

Now after deploying it in a machine where in that machine "Microsoft Report viewer 2005" installed. My reports works fine.

Now suppose in my machine if there is no "Microsoft Report viewer 2005" instead it has "Microsoft Report viewer 2010" installed. At this time i am getting error as
Error : Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0. ......

So i wanted to know whether i can do this
So is there any way that I will reference to one assembly version(for ex Microsoft.ReportViewer.WinForms.dll and Microsoft.ReportViewer.Common.dll with 8.0.0.0 version. This will work only when i install Microsoft Report viewer 2005) and reports will work for all its higher versions(like Even if i install Microsoft Report viewer 2008, 2010).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900