Untyped DataSet as datasource in Reportviewer

  • Thread starter Thread starter TompIfe
  • Start date Start date
T

TompIfe

Hi,
I want to use an untyped ADO dataset as a datasource in ReportViewer.
I know how to use typed datasets, but when i try to use similar code with an
untyped dataset, no report is rendered since (?)
I do not know how to get the untyped dataset defined as a data source.
Any suggestions are welcomed.
TompIfe
CODE:
DataSet ds = new DataSet();

DataTable dt = new DataTable("MinTabell");

dt = ds.Tables.Add();

dt.Columns.Add("FirstName");

dt.Columns.Add("LastName");

DataRow dr = dt.NewRow();

dr["Navn"] = "Tore";

dr["Alder"] = "Pedersen";

dt.Rows.Add(dr);

this.BindingSource.DataSource = ds;// (there is actually no BindingSource)

this.reportViewer1.Refresh();
 
Back
Top