vant view dataset with microsoft report viewer
- by Tan
I have a dataset, the dataset is using a stored procedur to fetch data.
i have filled the dataset and everythings is okej.When iam using the debug i can se that the dataset is not empty. but i cant view it with the microsoft report viewer.
here is my code please help.
private void frmPrint_Load(object sender, EventArgs e) {
this.reportViewer1.RefreshReport();
reportViewer1.LocalReport.DataSources.Clear();
GetCauseMachineMatrixTableAdapter adapter = new GetCauseMachineMatrixTableAdapter();
QpNibrolDataSet dataset = new QpNibrolDataSet();
adapter.Fill(dataset.GetCauseMachineMatrix, this.start, this.end);
DataTable DT = dataset.Tables[0];
ReportDataSource reportdatasource = new ReportDataSource();
reportdatasource.Name = "RDS_NAME";
reportdatasource.Value = DT;
reportViewer1.LocalReport.DataSources.Add(reportdatasource);
reportViewer1.LocalReport.Refresh();
reportViewer1.RefreshReport();
}
the form is saying "The source of the report definition is not been specified"
what im i doing wrong.
Idont use a rdlc because when iam trying to view my dataset no columms name show because the Stored procedur i am using requires Parameters. please advice and help my thank you