Binding ReportViewer to a Data Source. Beginner question. VS2005.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I created a local .rdlc report and a simple Data Source by wizard.

Ad design time I went on 'Report' -> 'Data Sources...' menu and added my
Data Source in my report.

So I added the report viewer control in a form, set ProcessingMode to local
and ReportPath with my report.rdlc.

Now, when I build and run, and open my form, I get an error (written in the
report viewer area):

A data source instance has not been supplied for the data source
'MyDataSource_MyTable'

What could be wrong?
 
Ok, got it.

It just wanted me to add an instance of the dataset, fill it and add it to
the report in the form_load event handler as

Me.ReportViewer1.LocalReport.DataSources.Add(New
ReportDataSource("MyDataSet_MyTable", MyDataSet.MyTable))
 
Back
Top