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.UserID = "Admin" cx.ConnectionInfo.Password = "19922991" dx.ApplyLogOnInfo(cx) Next reports.CrystalReportViewer1.ReportSource = rpt reports.CrystalReportViewer1.RefreshReport() reports.ShowDialog()
reports.CrystalReportsViewer.RefreshReport()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)