我认为这是一个新错误,因为我在谷歌中找不到任何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
以下是两种可行的解决方案。
- 检查要引用的表/字段。
AxCrystalReport1.SelectionFormula
的内容可能有误。你需要确保它们是正确的 - 请检查用于在应用程序中生成报告的版本和控件。crystal ver higher创建的报告应该由对应于8的控件生成版本或更高版本,如果你能避免ActiveX进入.net控件