Crystal Report SP26 SetDataSource() 方法在 Visual Studio 2019 中客户端的计算机中失败 [英] Crystal Report SP26 SetDataSource() Method failed in computers of clients in Visual Studio 2019

查看:44
本文介绍了Crystal Report SP26 SetDataSource() 方法在 Visual Studio 2019 中客户端的计算机中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 Visual Studio 2019 和 Crystal Report Service Pack 26.我的代码将数据读入 ADO.NET 数据集,并将这些数据集设置为我的报表的数据源.Visual Basic.Net 中的类似内容:

​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

当我通过 VS 运行程序时,一切都很好,报告显示没有错误.但是当我想在另一台只安装了 CR26 运行时的计算机上运行我的程序时,它会在调用 SetDataSource 方法进行报告时出错,如下所示:

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?

推荐答案

感谢@Julie,我发现缺少文件需要使用 Crystal Report SP26 运行 ADO.Net 报表.不幸的是,当您安装 SP26 运行时,它不会复制 crdb_adoplus.dll 文件,该文件需要水晶报表从 ADO.Net 数据集加载数据.

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.

解决办法如下:

  • 在 32 位操作系统中:您必须从以下文件夹将 crdb_adoplus.dll 文件从开发者计算机复制到客户端计算机:

  • 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 BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86

C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86

在 64 位操作系统中:您必须从以下文件夹将 crdb_adoplus.dll 文件从开发者计算机复制到客户端计算机:

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 BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win64_x64

C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win64_x64

而且它工作正常.我希望 SAP 在未来的服务包中解决这个问题.

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

这篇关于Crystal Report SP26 SetDataSource() 方法在 Visual Studio 2019 中客户端的计算机中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆