namespace Example.Web
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
    using System.Data;

    /// <summary>
    /// Summary description for Report2.
    /// </summary>
    public partial class Report2 : Telerik.Reporting.Report
    {
        public Report2()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            this.DataSource = Generate();
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        public static DataTable Generate()
        {
            DataTable dummyDataSource = new DataTable();
            dummyDataSource.Columns.Add("SSN", typeof(int));
            dummyDataSource.Columns.Add("Gender", typeof(string));
            dummyDataSource.Columns.Add("Age", typeof(int));
            Random random = new Random(DateTime.Now.Millisecond);
            for (int i = 0; i < 50000; i++)
            {
                int ssn = random.Next(0, 999999999);
                string gender = (random.Next(0, 100) % 2 == 0) ? "Male" : "Female";
                int age;
                if ("Male" == gender)
                {
                    age = random.Next(18, 25);
                }
                else
                {
                    age = random.Next(23, 30);
                }
                dummyDataSource.Rows.Add(ssn, gender, age);
            }
            return dummyDataSource;
        }
    }
}