我一直在处理我的应用程序在我的机器上安装安装程序后抛出的一种无错误消息。 应用程序运行正常,并按照我想要的方式生成报告。问题是在将其编译为设置后,它会抛出此消息:
System.Runtime.InteropServices.COMException (0x80000000);
No error.
at
CrystalDesisionsReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault)
at
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
at
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)
at Presby_Soft.reportFrm.reportFrm_Load(Object sender, EventArgs e)
这是我使用的代码:
Private Sub reportFrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If conn.State = ConnectionState.Closed Then
conn.Open()
End If
Try
Dim rpt As New CrystalReport1()
Dim da As New SQLiteDataAdapter
Dim ds As New presbydbDataSet
'Dim cmd As New SQLiteCommand("SELECT personal_details.fn, training.training_level FROM personal_details INNER JOIN training ON personal_details.Staff_ID ='" + detailsFrm.Label13.Text + "'", conn)
Dim cmd As New SQLiteCommand("SELECT * FROM personal_details WHERE personal_details.staff_ID='" + detailsFrm.Label13.Text + "'", conn)
cmd.ExecuteNonQuery()
da.SelectCommand = cmd
da.Fill(ds, "personal_details")
rpt.Subreports.Item("persoRpt").SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
Catch ex As Exception
MsgBox(ex.ToString)
End Try
conn.Close()
End Sub
请帮助,我真的不知道如何解决这个问题。谢谢你的回答
答案 0 :(得分:0)
我设法摆脱了这个问题。问题是我正在将业务对象文件直接添加到bin文件夹中,而业务对象已经安装在计算机上。我刚刚删除了我添加的业务对象文件,应用程序工作正常。