Vb.net Visual studio抛出System.Runtime.InteropServices.COMException:';HRESULT异常:0x800A5023';浅谈水晶报表的使用

Vb.net Visual studio抛出System.Runtime.InteropServices.COMException:';HRESULT异常:0x800A5023';浅谈水晶报表的使用,vb.net,crystal-reports,visual-studio-2019,Vb.net,Crystal Reports,Visual Studio 2019,我认为这是一个新错误,因为我无法在System.Runtime.InteropServices.COMException中找到任何内容:“来自HRESULT的异常:0x800A5023”关键字在google中 我的代码 Public Sub tampilkantiket() AxCrystalReport1.SelectionFormula = "totex{{pemesanan.id_pemesanan}}='" & txtidpemesanan.Text & "

我认为这是一个新错误,因为我无法在System.Runtime.InteropServices.COMException中找到任何内容:“来自HRESULT的异常:0x800A5023”关键字在google中

我的代码

   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.选择公式可能错误。您需要确保它们是正确的
  • 检查用于在应用程序中生成报告的版本和控件。由crystal ver创建的报告 应通过与该值对应的控件生成大于8的值 版本或更高版本,如果可以避免ActiveXs进入.net 控制