Пример #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var data = db.Etudiants
                       .Join(
                db.Colleges,
                College => College.IdCollege,
                Etudiant => Etudiant.IdCollege,
                (Etudiant, College) => new
            {
                IdEtudiant  = Etudiant.IdEtudiant,
                Nom         = Etudiant.Nom,
                Prenom      = Etudiant.Prenom,
                Telephone   = Etudiant.Telephone,
                Email       = Etudiant.Email,
                AnneeEntree = Etudiant.AnneeEntree,
                nomCo       = College.nomCo,
                AdresseSite = College.AdresseSite
            }
                ).Where(c => c.IdEtudiant == Id).ToList();
            ReportDocument report = new ReportDocument();
            FSEtudiant     d      = new FSEtudiant();

            d.SetDataSource(data);
            CrystalEtudiant.ViewerCore.ReportSource = d;
        }
Пример #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            FSEtudiant rpt = new FSEtudiant();

            rpt.Site = this.Site;
            return(rpt);
        }