I'm trying to bind a DataTable
to a reportviewer
in winforms
at runtime but I get this message in the reportviewer
(not an exception)"
The source of the report definition has not been specified"
Here's my code:
this.rptViewer.LocalReport.DataSources.Clear();
ReportDataSource rprtDTSource = new ReportDataSource(dt.TableName, dt);
this.rptViewer.LocalReport.DataSources.Add(rprtDTSource);
this.rptViewer.RefreshReport();
any Ideas?