Wie kann ich load datatable als ReportDataSource?

Ich versuche zu tun, so etwas wie:

this.reportViewer.LocalReport.DataSources.Clear();
DataTable dt = new DataTable();
dt = this.inputValuesTableAdapter.GetData();    
Microsoft.Reporting.WinForms.ReportDataSource rprtDTSource = new Microsoft.Reporting.WinForms.ReportDataSource();

rprtDTSource = dt; //this line generates exception   

//this.reportViewer.LocalReport.DataSources.Add(rprtDTSource);
this.reportViewer.RefreshReport();

Wie kann ich load datatable als ReportDataSource?

Den aktuellen code erzeugt:
"Kann nicht implizit konvertiert Typ 'System.Daten.DataTable' zu 'Microsoft.Die Berichterstattung.WinForms.ReportDataSource' "

  • es ist nur c# reporting..
InformationsquelleAutor ehmad | 2010-10-23
Schreibe einen Kommentar