Different version of ReportViewer component in one application

In my company, I have an application that should run on two different sites with a different database configuration. On one site we have Sql Server 2008 R2, on another server Sql Server 2005; we cannot upgrade Sql Server 2005 until next year. The application has no problems accessing various databases, but I have a problem with some reports hosted by the report server.

With Sql Server 2005, I have to use ReportViewer DLL version version 8.0, while with Sql Server 2008 I have to use 10.0.

In any case, in order to manage both versions of the component in the same Visual Sutdio Solution / Project and choose the runtime, which version should be downloaded? If this is not possible, do you have any alternatives? (Obviously, two projects are not an option)

Thanks a lot!

+4
source share
2 answers

I found out that you can use Microsoft.ReportViewer.WinForms Version 9.0.0.0, which supports both SSRS 2005 and SSRS 2008

0
source

You can dynamically load an assembly

Dynamic assembly loading at runtime

base it on something in the configuration file that it selects.

I think you can also put something in a configuration file that determines at runtime which assembly to use, but I never used, and I don't know what to do there.

+1
source

Source: https://habr.com/ru/post/1340991/


All Articles