Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            EnrollmentReport rpt = new EnrollmentReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        public void loadEnrollmentReport(List<Customer> students, String enrollmentStatus, String numberOfStudents)
        {
            EnrollmentReport rpt = new EnrollmentReport();
            DataSetStudents ds = new DataSetStudents();
            List<String> maleList = new List<string>();
            List<String> femaleList = new List<string>();
            foreach (Customer c in students)
            {
                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"] = c.CustomerID;
                cRow["CustomerName"] = c.CustomerName;
                cRow["FirstName"] = c.FirstName;
                cRow["LastName"] = c.LastName;
                cRow["Level"] = c.Level;
                cRow["Section"] = c.Section;
                cRow["Gender"] = c.Gender;
                ds.Student.Rows.Add(cRow);
                if (c.Gender.Equals("Male"))
                    maleList.Add(c.Gender);
                else femaleList.Add(c.Gender);
            }
            rpt.DataDefinition.FormulaFields["EnrollmentStatus"].Text = "\""+enrollmentStatus+"\"";
            rpt.DataDefinition.FormulaFields["NumberOfStudents"].Text = "\"" + numberOfStudents + "\"";
            rpt.SetDataSource(ds);

            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
Ejemplo n.º 3
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     EnrollmentReport rpt = new EnrollmentReport();
     rpt.Site = this.Site;
     return rpt;
 }