TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Yogesh Morankar
NA
7
0
Report viewer with dataset having multiple Tables , master with more than one detail sections
Jul 30 2010 6:57 AM
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.
Reply
Answers (
1
)
Again asking for parameters value while sending from c# to crystal report
ASP.NET Website and SQL Reports Server