本文介绍了“无法打开行集”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 帮助我......我正在使用Crystal嵌入式9报告。我有一个报告,我正在使用以下代码加载。当我在客户端的PC中部署应用程序时"无法打开行集"是出现的错误。我正在使用ODBC连接。任何帮助将不胜感激....Help me.... I am using Crystal reports 9 embedded. I have a report which I'm loading using the following code. When I deploy the application in a client's pc "Failed to open a rowset" is the error that appears. I am using an ODBC connection. Any help would be appreciated.... Dim cr As New crptCMRDim cr As New crptCMR Dim crtableLogoninfos As New TableLogOnInfos Dim crtableLogoninfo As New TableLogOnInfo Dim crConnectionInfo作为新的ConnectionInfo Dim CrTables作为表 Dim CrTable As Table Dim TableCounterDim crtableLogoninfos As New TableLogOnInfosDim crtableLogoninfo As New TableLogOnInfoDim crConnectionInfo As New ConnectionInfoDim CrTables As TablesDim CrTable As TableDim TableCounter Dim crReportDocument As new crptCMRDim crReportDocument As New crptCMR使用crConnectionInfo .ServerName = sname .DatabaseName = dbname .UserID = uid .Password = pwd 结束With crConnectionInfo.ServerName = sname.DatabaseName = dbname.UserID = uid.Password = pwdEnd With CrTables = crReportDocument.Database.TablesCrTables = crReportDocument.Database.Tables对于CrTable中的每个CrTable crtableLogoninfo = CrTable.LogOnInfo crtableLogoninfo.ConnectionInfo = crConnectionInfo CrTable.ApplyLogOnInfo(crtableLogoninfo)下一步For Each CrTable In CrTablescrtableLogoninfo = CrTable.LogOnInfocrtableLogoninfo.ConnectionInfo = crConnectionInfoCrTable.ApplyLogOnInfo(crtableLogoninfo)Next CRVcmr.ReportSource = crReportDocumentCRVcmr.ReportSource = crReportDocument推荐答案 尝试创建类型化数据集并将其用于在水晶报告中创建字段。然后使用..Try creating a typed dataset and use this to create your fields in your crystal report. Then used..用数据加载dsData ...Load dsData with data...将报告作为新的MyReport()Dim Report as new MyReport() Report.SetDataSource(dsData.Tables(" MyTable"))Report.SetDataSource(dsData.Tables("MyTable"))希望这会有所帮助.. Hope this helps.. den2005 这篇关于“无法打开行集”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-20 11:19