This is a migrated thread and some comments may be shown as answers.

Report Table data rows is not showing

1 Answer 194 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
raju
Top achievements
Rank 2
raju asked on 04 May 2009, 04:20 PM
Hi,,
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)
        InitializeComponent()
        ShowInfo(InvoiceID)
    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
        Try
            Dim da As New MySqlDataAdapter
            Dim bind As New BindingSource
            Dim strConn As String = ConfigurationManager.AppSettings("ConnectionString")
            Dim objConn As MySqlConnection = New MySqlConnection(strConn)
            objConn.Open()
            da = New MySqlDataAdapter(strQuery, objConn)
            da.FillSchema(ds, SchemaType.Source, strTbl)
            da.Fill(ds, strTbl)
            objConn.Close()
            Return ds
        Catch ex As Exception
            Return ds
        End Try
    End Function
End Class


Regards
Raju

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 May 2009, 09:35 AM
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,
Steve
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.
Tags
General Discussions
Asked by
raju
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or