fill report1.rdlc with select command and where condation RRS feed

  • Question

  • i try to fill report1.rdlc with below code but it show empty

    Imports Microsoft.Reporting.WinForms
    Public Class report1

    End Class
    Public Class Form3

        Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'TODO: This line of code loads data into the 'MasterDataSet.MPatient1' table. You can move, or remove it, as needed.

            Dim rpt As New report1
            Dim rptDataSource As ReportDataSource
            If form1.TextBox3.Text <> "" Then
                Cmd.CommandText = "Select * from  [mpatient] where LabNo ='" & form1.TextBox3.Text & "'"
                da.SelectCommand = Cmd
                da.Fill(ds, "mpatient1")
                rptDataSource = New ReportDataSource("masterdataset", ds.Tables("mpatient1"))
            End If

        End Sub
    End Class

    Sunday, March 16, 2014 6:13 AM