Click here to Skip to main content
15,886,810 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created one simple report with a sub report.
When i run it there is no any error while debuging but after it gives error "The parameter is incorrect ".

i have not created any parameter in main as well as sub report.
i am using two dataset here is code.
C#
ds = ReportsClass_obj.Select_Employee_Report();
ds2 = ReportsClass_obj.Select_Student_DMW()
rptRatioReportNew RatioReport = new rptRatioReportNew();
                            RatioReport.Subreports[0].DataSourceConnections.Clear();

RatioReport.SetDataSource(ds.Tables[0]);

RatioReport.Subreports[0].SetDataSource(ds2.Tables[0]);
rptViewer.ReportSource = RatioReport;
rptViewer.Refresh();
rptViewer.Show();

Please help me out...!
Posted
Updated 22-Dec-14 23:35pm
v2
Comments
KaushalJB 23-Dec-14 5:51am    
Why performing Clear before giving DataSource ? RatioReport.Subreports[0].DataSourceConnections.Clear();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900