Ejemplo n.º 1
0
        public void loadAgeAndAddress(List<Customer> AllStudents)
        {
            AgeAndAddress rpt = new AgeAndAddress();
            DataSetStudents ds = new DataSetStudents();
            foreach (Customer c in AllStudents)
            {
                int age = DateTime.Now.Year - c.Birthday.Year;
                int month = DateTime.Now.Month - c.Birthday.Month;

                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"] = c.CustomerID;
                cRow["FirstName"] = c.FirstName;
                cRow["LastName"] = c.LastName;
                cRow["Gender"] = c.Gender;
                //cRow["EmailAddress"] = c.EmailAddress;
                //cRow["Level"] = c.Level;
                //cRow["Section"] = c.Section;
                //cRow["Guardians"] = c.BillTo;
                cRow["Address"] = c.CustomerAddress.AddressString;
                if (month < 0)
                    cRow["Age"] = (age.ToString() + " " + getFraction(getMonthValue((month = (month * 2) + month))));
                else cRow["Age"] = (age.ToString() + " " + getFraction(getMonthValue(month)));
                ds.Student.Rows.Add(cRow);
            }
            rpt.SetDataSource(ds);
            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
Ejemplo n.º 2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            AgeAndAddress rpt = new AgeAndAddress();

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