开发者

Different version of ReportViewer component in the same application

In my company i have an application which should run at two different sites with different database configuration. At one site we have Sql Server 2008 R2, at the other one Sql Server 2005; we cannot upgrade the Sql Server 2005 until next yer. The application has no problem to access the different DB, but i have a problem with some reports hosted by report server.

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

Is there anyway to manage both versions of the component in the same Visual Sutdio Solution/Project and choose runtime which version should b开发者_Python百科e loaded? If it's not possible, do you have any alternatives in mind? (Obviously two project are not an option)

Thanks a lot!


You could dynamically load the assembly

Dynamically Loading an assembly at Runtime

base it on something in the config file as to which it chooses.

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


I found out that it is possible to use the Microsoft.ReportViewer.WinForms Version 9.0.0.0 which support both SSRS 2005 and SSRS 2008

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜