Sub showreport()
sql = "SELECT * FROM tb_repair WHERE daterepair BETWEEN @dt3 AND @dt4"
command = New SqlCommand(sql, connection)
Dim dt3 As String = GetDateTime(DateTimePicker1)
Dim dt4 As String = GetDateTime(DateTimePicker2)
command.Parameters.AddWithValue("dt3", dt3)
command.Parameters.AddWithValue("dt4", dt4)
adapter = New SqlDataAdapter(command)
dataSt = New DataSet()
adapter.Fill(dataSt, "5report")
connection.ConnectionString = strConnString
With command
.Connection = connection
.CommandText = strSQL
.CommandType = CommandType.Text
End With
adapter.SelectCommand = command
adapter.Fill(ds)
dt = ds.Tables(0)
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DbtiwayontDataSet1.xsd_tb_repair1", dt))
ReportViewer1.LocalReport.ReportPath = "report1.rdlc"
ReportViewer1.LocalReport.Refresh()
End Sub