Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using this report crystal report showing only first record, when i debug the same code one by one crystal report shows all record according to parameter passed. Please suggest me some solution or idea.

C#
CrystalReportfeespy feespay = new CrystalReportfeespy();
                        OleDbConnection con9 = new OleDbConnection();
                        con9.ConnectionString = ConfigurationSettings.AppSettings["connection"];
                        con9.Open();

                        OleDbCommand cmd9 = new OleDbCommand("select * from StudentFeesPay where ReciptNo=@rcptno AND RegId=@rg ", con9);
                        cmd9.Parameters.Add(new OleDbParameter("@rcptno", txtReciptNo.Text));
                        cmd9.Parameters.Add(new OleDbParameter("@rg", txtRegId.Text));
                                             
                        OleDbDataAdapter da9 = new OleDbDataAdapter();
                        da9.SelectCommand = cmd9;

                        DataSetFeesPayment ds9 = new DataSetFeesPayment();
                        da9.Fill(ds9, "StudentFeesPay");
                        feespay.SetDataSource(ds9);
                        crystalReportViewer1.ReportSource = feespay;
Posted
Comments
Dave Kreskowiak 29-Mar-15 8:46am    
Probably because you query is only returning one record. Have you tried your query with your parameters in whatever database engine you're using?

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