Report Data Sources
04-Sep-0909 Leave a comment
When designing a report there is an extra top menu. So use Report > Data Sources.
Ideally DataSource is in same project. Possibly use Objects in future if not in same project. Seems awkward.
Error "The source of the report definition has not been specified"
Dim ds As New dsA
Dim ta As New dsATableAdapters.ATableAdapter
ta.Fill(ds.A)
Dim bs As New Windows.Forms.BindingSource(ds, ds.A.TableName)
Dim ReportDataSource1 As ReportDataSource = New ReportDataSource
ReportDataSource1.Name = "dsA_A" 'Important to use datasource name as used on report
ReportDataSource1.Value = bs
With Me.ReportViewer1.LocalReport
.DataSources.Add(ReportDataSource1)
.DataSources(0).Value = bs
End With