Report Table data rows is not showing

2 posts, 0 answers
  1. raju
    raju avatar
    15 posts
    Member since:
    Feb 2009

    Posted 04 May 2009 Link to this post

    I can not able to add datarows in to the table, I am assign dataset programatically,
    Below is mycode extract, Please give me advice.

    Partial Public Class DAReport
        Inherits Telerik.Reporting.Report
        Public Sub New(ByVal InvoiceID as integer)
        End Sub

    Sub ShowInfo(ByVal InvoiceID as integer)
     Dim oView As System.Data.DataView = Nothing
     Dim strQuery As String = "select * from invoice_lineItems where invid="& InvoiceID
     Table1.DataSource = getDataSet(strQuery, "invoice_lineItems")
     Table1.DataMember = "da_invoice_lineitems"
    End Sub


    Public Function getDataSet(ByVal strQuery As String, ByVal strTbl As String) As System.Data.DataSet

            Dim ds As System.Data.DataSet = New DataSet
                Dim da As New MySqlDataAdapter
                Dim bind As New BindingSource
                Dim strConn As String = ConfigurationManager.AppSettings("ConnectionString")
                Dim objConn As MySqlConnection = New MySqlConnection(strConn)
                da = New MySqlDataAdapter(strQuery, objConn)
                da.FillSchema(ds, SchemaType.Source, strTbl)
                da.Fill(ds, strTbl)
                Return ds
            Catch ex As Exception
                Return ds
            End Try
        End Function
    End Class

  2. Steve
    Steve avatar
    10941 posts

    Posted 05 May 2009 Link to this post

    Hi raju,

    Your code looks correct, so please check if your dataset returns data. You can test binding a standard DataGrid control in the same manner and see if you get any results.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top