0

I'm new to vb and therefor I can't find where is the error while I'm making reports.
I coded My report button like this :

 Dim adapter As New MySqlDataAdapter
        Dim ds As New DataSet1
        adapter.SelectCommand = New MySqlCommand("Select * from mcs.custormer", Form1.mysqlcon)
        adapter.Fill(ds.Tables(0))
        ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
        ReportViewer1.LocalReport.ReportPath = System.Environment.CurrentDirectory & "\report1.rdlc"
        ReportViewer1.LocalReport.DataSources.Clear()
        ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("Dataset1_datatable1", ds.Tables(0)))
        ReportViewer1.DocumentMapCollapsed = True
        Me.ReportViewer1.RefreshReport()

When I run this program it says :
"a data source instance has not been supplied for the datasource 'dataset1'" error.
Please help me guys

2
Contributors
1
Reply
12
Views
11 Months
Discussion Span
Last Post by Shark_1
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.