Crystal Report要求数据库访问登录

时间:2017-11-10 18:20:53

标签: vb.net crystal-reports

    Dim rpt As New stage1
    rpt.Load("stage1.rpt")
    Dim dx As CrystalDecisions.CrystalReports.Engine.Table
    Dim cx As CrystalDecisions.Shared.TableLogOnInfo
    For Each dx In rpt.Database.Tables
        cx = dx.LogOnInfo
        cx.ConnectionInfo.DatabaseName = Application.StartupPath & "\studentdb.accdb"
        cx.ConnectionInfo.Password = "19922991"
        dx.ApplyLogOnInfo(cx)
    Next
    reports.CrystalReportViewer1.ReportSource = rpt
    reports.CrystalReportViewer1.RefreshReport()
    reports.ShowDialog()][1]

如何解决错误访问数据库登录水晶报告vb.net?

0 个答案:

没有答案