Page 1 of 1

how to bind a data set

Posted: Wed Jan 20, 2010 2:19 am
by shm
Hi,
How to Bind a DataSet to Our Report in our web Application(VS 2008) at run time without setting any data source to our dataBand in Report Design.
please help me immediately.

how to bind a data set

Posted: Wed Jan 20, 2010 4:02 am
by Edward
Hi

Please use the following code:

report.RegData("ConnectionName", dataSet);
report.Dictionary.Synchronize();
(report.GetComponents()["MyDataBand"] as StiDataBand).DataSourceName = "NameOfTheDataTableInDataSet";

Thank you.