hi,
i'm using crystal report and my question is how to create a crystal report which displays fields from 2 tables. i tried this
code but nothing displays in the report
SqlCeConnection con = new SqlCeConnection();
con.ConnectionString = @" Data source= |DataDirectory|\Database1.sdf";
con.Open();
Database1DataSet ds = new Database1DataSet();
SqlCeParameter paramNom = new SqlCeParameter("@nom", nomimprimerTextBox.Text);
SqlCeParameter paramPrenom = new SqlCeParameter("@prenom", prenomimprimerTextBox.Text);
SqlCeDataAdapter da = new SqlCeDataAdapter("Select Personne.[Nom],Personne.[Prenom],Personne.[DateNaissance],Personne.[LieuNaissance],Bulletin.[Autorite],Bulletin.[DateJ] from (Personne inner join Bulletin on Personne.[CodePersonne]=Bulletin.[CodePersonne])where Personne.[Nom]=@nom and Personne.[Prenom]=@prenom", con);
da.SelectCommand.Parameters.Add(paramNom);
da.SelectCommand.Parameters.Add(paramPrenom);
da.Fill(ds,"Personne ");
CrystalReport2 cr2 = new CrystalReport2();
cr2.SetDataSource(ds);
crystalReportViewer1.ReportSource = cr2;
crystalReportViewer1.Refresh();
thank you