Crystal Report SP26 SetDataSource() Method failed in computers of clients in Visual Studio 2019

99封情书 提交于 2020-02-24 07:59:32

问题


​I'm working on Visual Studio 2019 and Crystal Report Service Pack 26. My code read data into ADO.NET dataset and I set those datases as datasourse of my reports. something like this in Visual Basic.Net:

    Dim ds1 As New DataSet1()

    Dim myRep As New CrystalReport1
    taAccArticleFields_TBL.Fill(ds1.AccArticleFields_TBL)
    myRep.SetDataSource(ds1)
    crvReport.ReportSource = myRep

When I run program through VS all is good and reports show without error. But when I want to run my program on another computer which only has CR26 runtime installed, it gives an error on calling SetDataSource method for report as below:

System.Runtime.InteropServices.COMException (0x800002CD): Error in File temp_04020c6d-5b84-40d9-8558-bf87b6d5e554 4840_5464_{1C1D3ACF-9F25-45E2-B0EE-BB77F1DDA6B6}.rpt: Failed to load database information. 
at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault) 
at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type) 
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)

I encounter this with any program I write. Does anyone have idea to solve this?


回答1:


Please check in the previous article, witch may provide you with a solution:

1.Copy the file crdb_filesystem.dll from the development computer to the client computer

2.CRdb_filesystem.dll is in the following directory on the development computer: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86




回答2:


Thanks to @Julie I found missing file need to run ADO.Net report using Crystal Report SP26. Unfortunately, When you install SP26 run-time it doesn't copy crdb_adoplus.dll file which need to Crystal Report to load data from ADO.Net dataset.

Here is the solution:

  • In 32bit operating systems: you have to copy crdb_adoplus.dll file from developer computer to client machine from following folder:

    C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86

  • In 64bit operating systems: you have to copy crdb_adoplus.dll file from developer computer to client machine from following folder:

    C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64

    And it work correctly. I hope SAP resolve this problem in the future service pack.



来源:https://stackoverflow.com/questions/59666654/crystal-report-sp26-setdatasource-method-failed-in-computers-of-clients-in-vis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!