Private Sub ShowReport()
Report.Load(Application.StartupPath & "/Report/" & ReportName & "")
'********* ใส่ UserName กับ Password
Dim rptTLog As New CrystalDecisions.Shared.TableLogOnInfo
rptTLog.ConnectionInfo.ServerName = SVName
rptTLog.ConnectionInfo.DatabaseName = DBName
rptTLog.ConnectionInfo.UserID = UID
rptTLog.ConnectionInfo.Password = PWD
For i As Short = 0 To Report.Database.Tables.Count() - 1
Report.Database.Tables(i).ApplyLogOnInfo(rptTLog)
Next
'********* End ใส่ UserName กับ Password
Report.Refresh()
Dim _frmReport As New frmShowReport
_frmReport.ShowDialog()
Me.Cursor = Cursors.Default
End Sub