【问题标题】:Exception from HRESULT: 0x800A5077 when excute crystal reportHRESULT 异常:执行水晶报告时出现 0x800A5077
【发布时间】:2021-07-13 15:58:15
【问题描述】:

我收到错误0x800A5077,我尝试导入CrystalActiveXReportViewerLib10CrystalReportsCommonObjectModelLib,但它仍然没有工作。

Call ReportConnection(CInspAuditList, "Pab_Prod")
        CInspAuditList.ReportFileName = My.Application.Info.DirectoryPath & "\MAuditList.rpt"
        Call SubReportConnection(CInspAuditList, "Pab_Prod")
        CInspAuditList.set_ParameterFields(0, "mchno; " & frmMachine.machine & " ;true")
        CInspAuditList.set_ParameterFields(1, "batch; " & CDbl(frmMachine.batch) - 1 & " ;true")
        CInspAuditList.set_ParameterFields(2, "Points; " & InpStdPt & " ;true")
        CInspAuditList.set_ParameterFields(3, "ovrpt; " & OvrPoints & " ;true")
        CInspAuditList.Action = 1

CInspAuditList.Action = 1时出现错误

vb.net 帮我声明CInspAuditList as AxCrystal.AxCrystalReport
这是我的连接功能:

Public Function ReportConnection(ByRef CrystalReport1 As AxCrystal.AxCrystalReport, ByRef dsnname As String) As Boolean
        CrystalReport1.Connect = "dsn=" & dsnname & ";UID=" & gstrID & ";PWD=" & gstrPassword & ";DSQ="
    End Function

我想知道导致错误发生的原因以及我的连接是否正确

【问题讨论】:

    标签: vb.net crystal-reports crystal-reports-2008


    【解决方案1】:

    这发生在我身上,那是因为报告文件 (.rpt) 包含与您正在运行程序的计算机不存在或无法找到的数据库的连接解决方​​案:打开报告文件 (.rpt) rpt), menu database, verify database, checkout the parameters of the connection(我的是sql连接), ok, 你可以看到一个msg说数据库是最新的, ok, 保存报告中的变化

    【讨论】:

      【解决方案2】:

      如果您使用系统 dsn,水晶报表需要管理员权限才能连接。 在注册表中,ODBC 键是本地机器,并且只授予系统和管理员完全控制权。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-11-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多