Dim DGdata As DataTable = ExcuteMysql("SELECT JobID,Date_R,Subject,Reqdetail,ReqbyEmp,StatusCd FROM Jobhelpdesk WHERE NOT (StatusCd='Cancel')")
DataGridView1.DataSource = DGdata
Private Sub BtnPrt_Click(sender As Object, e As EventArgs) Handles BtnPrt.Click
Dim data As DataTable = ExcuteMysql("ELECT Jobhelpdesk.JobID,Jobhelpdesk.Date_R,Jobhelpdesk.Subject,Jobhelpdesk.Reqdetail,SPTEMP.NameCd,SPTEMP.PositionCd,SPTEMP.DeptCd,SPTEMP.SectionCd FROM Jobhelpdesk INNER JOIN SPTEMP ON Jobhelpdesk.ReqbyEmp = SPTEMP.EmpCd WHERE Jobhelpdesk.JobID = 'IT010'")
Dim rpt As New ReportDocument()
Dim directory As String = My.Application.Info.DirectoryPath
rpt.Load("D:\Jeerapan\VB\JobHelpDesk\JobHelpDesk\CrystalReport1.rpt")
Me.CrystalReportViewer1.ReportSource = rpt
Me.CrystalReportViewer1.Refresh()
End Sub