Report viewer with dataset having multiple Tables , master with more than one detail sections
Hi I m using sqlCe 3.5 & .Net compact edition.
I have one report having 1 master & 3 detail sections.
these details sections & master details are stored in one dataset with four tables (including separate table for master records).
I m not able to configure the report with this dataset as datasource.
I Fill dataset with individual dataTablw with master-detail records. & adding multiple datasources to reportviewer as follows.
cmd = DataAccess.CreateCommand(query,1 queryparamtable, conn);
adapter = new SqlCeDataAdapter(cmd);
adapter.Fill(dataset, "Table1");
cmd = DataAccess.CreateCommand(query2, queryparamtable, conn);
adapter = new SqlCeDataAdapter(cmd);
adapter.Fill(dataset, "Table2");
cmd = DataAccess.CreateCommand(query3, queryparamtable, conn);
adapter = new SqlCeDataAdapter(cmd);
adapter.Fill(dataset, "Table3");
cmd = DataAccess.CreateCommand(query4, queryparamtable, conn);
adapter = new SqlCeDataAdapter(cmd);
adapter.Fill(dataset, "Table4");
then ,
BindingSource dataSource = new BindingSource();
dataSource.DataSource = dataset;
dataSource.DataMember = "Table1";
ReportDataSource reportDataSource = new ReportDataSource();
reportDataSource.Name = dataSource.DataMember;
reportDataSource.Value = dataSource;
BindingSource dataSource = new BindingSource();
dataSource.DataSource = dataset;
dataSource.DataMember = "Table2";
ReportDataSource reportDataSource = new ReportDataSource();
reportDataSource.Name = dataSource.DataMember;
reportDataSource.Value = dataSource;
BindingSource dataSource = new BindingSource();
dataSource.DataSource = dataset;
dataSource.DataMember = "Table3";
ReportDataSource reportDataSource = new ReportDataSource();
reportDataSource.Name = dataSource.DataMember;
reportDataSource.Value = dataSource;
BindingSource dataSource = new BindingSource();
dataSource.DataSource = dataset;
dataSource.DataMember = "Table4";
ReportDataSource reportDataSource = new ReportDataSource();
reportDataSource.Name = dataSource.DataMember;
reportDataSource.Value = dataSource;
My .rdlc file having One list component . In thet i have 5 fiels & two table component.
These table components have details fields.
but somehow its not working.
please can anyone tell me whats going wrong there.