Report Data Sources

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
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(0).Value = bs
End With

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: