Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim cryRpt As New ReportDocument
- Dim crtableLogoninfos As New TableLogOnInfos
- Dim crtableLogoninfo As New TableLogOnInfo
- Dim crConnectionInfo As New ConnectionInfo
- Dim CrTables As Tables
- Dim CrTable As Table
- cryRpt.Load("C:\Users\Gian-PC\Documents\Visual Studio 2015\Projects\Capsstone\Capsstone\CrystalReport1.rpt")
- With crConnectionInfo
- .DatabaseName = "GoodShepherd"
- End With
- CrTables = cryRpt.Database.Tables
- For Each CrTable In CrTables
- crtableLogoninfo = CrTable.LogOnInfo
- crtableLogoninfo.ConnectionInfo = crConnectionInfo
- CrTable.ApplyLogOnInfo(crtableLogoninfo)
- Next
- CrystalReportViewer1.ReportSource = cryRpt
- CrystalReportViewer1.Refresh()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement