Private Sub AdmManageSale_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ConnectDatabase()
lock()
'--new
Dim dc As New DatabaseLegdaDataSet
Dim sale = From d In dc.sale_detail
Select d.Sale_id
End Sub
Private Sub txtprint_Click(sender As Object, e As EventArgs) Handles btn_p.Click
Dim rpt As New ReportDocument
Dim directory As String = My.Application.Info.DirectoryPath
rpt.Load("C:\Users\1234\Documents\Visual Studio 2013\Projects\Legda_Project\Legda_Project\RptRe.rpt")
rpt.SetParameterValue("sid", txtSaleid.Text)
test.CrystalReportViewer1.ReportSource = rpt
test.CrystalReportViewer1.Refresh()
test.Show()
test.WindowState = FormWindowState.Maximized
End Sub