i have several components build in .net3.5 wich use crystal reports for creating reports:)
in my new .Net4.0 wpf ui i would use this components as i used it before in winforms. but it seems it is not possible-.
this开发者_JS百科 line in the 3.5 component
rd.SetDataSource(_dsReport);
produce the following error in .net4.0
Error:Unbekannter Datenbank-Connector-Fehler Fehler in der Datei C:\DOKUME~1\bereuter\LOKALE~1\Temp\temp_009c049c-ca48-4097-92c1-32031e24d297 {9AFAD195-922B-4ADB-AC34-DA5950821130}.rpt: Unbekannter Datenbank-Connector-Fehler
anyone has a solution to use my old components in .Net4.0 enviroment?
after some googling i found the answer to my problem.
i have to add the following to my app.config:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
and now all works like expected! :)
It looks like it is a connection error. Could you open the report and check if you can access the data from the report first.
Or you can try to create a simple report [without connecting to database] and see if it will work on your 3.5 component.
It could be something to do with different version of .Net Framework DLL do not like each other, in that case, you may need to migrate/ recompile the .net framework3.5 component to .Net4
精彩评论