Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
connect()
Dim dt As New DataTable
sql = "SELECT * FROM tbl_test"
cmd_excuteNonquery()
Dim dr = cmd.ExecuteReader()
dr.Read()
dt.Load(dr)
Me.ReportViewer1.Reset()
Me.ReportViewer1.ProcessingMode = ProcessingMode.Local
Me.ReportViewer1.LocalReport.DataSources.Clear()
Me.ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet2", dt))
Me.ReportViewer1.LocalReport.ReportEmbeddedResource = "MyProject.Report3.rdlc"
Me.ReportViewer1.LocalReport.Refresh()
Me.ReportViewer1.RefreshReport()
dr.Close()
cn.Close()
End Sub
ข้อมูลแสดงแบบนี้ใน report viewer
ID Name Surname
002 ทดสอบ ฟหกดกหฟ
ปัญหาคือ ลำดับที่ 001 แถวแรกหายไป
ใครรู้วิธีแก้ไขบ้างครับ
ขอบคุณครับ
Tag : .NET, Ms Access, Report Others, VB.NET, VS 2010 (.NET 4.x)