Visual Studio 在使用 Crystal report 时抛出 System.Runtime.InteropServices.COMException:"来自 HRESULT 的异常:0x8



我认为这是一个新错误,因为我在谷歌中找不到任何System.Runtime.InteropServices.COMException:"HRESULT异常:0x800A5023"关键字

我的代码

Public Sub tampilkantiket()
AxCrystalReport1.SelectionFormula = "totex{{pemesanan.id_pemesanan}}='" & txtidpemesanan.Text & "'"
AxCrystalReport1.ReportFileName = "Tiket.rpt"
AxCrystalReport1.WindowState = Crystal.WindowStateConstants.crptMaximized
AxCrystalReport1.RetrieveDataFiles()
AxCrystalReport1.Action = 1
End Sub

以下是两种可行的解决方案。

  1. 检查要引用的表/字段。
    AxCrystalReport1.SelectionFormula的内容可能有误。你需要确保它们是正确的
  2. 请检查用于在应用程序中生成报告的版本和控件。crystal ver higher创建的报告应该由对应于8的控件生成版本或更高版本,如果你能避免ActiveX进入.net控件

最新更新