Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CustomerReport rpt = new CustomerReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void CustomerReportList_Load(object sender, EventArgs e)
        {
            var            dkt   = DateTime.Now;
            DateTime       dates = DateTime.Now;
            var            fd    = new DateTime(dates.Year, dates.Month, 1);
            var            ld    = fd.AddMonths(1).AddDays(-1);
            CustomerReport cr    = new CustomerReport();

            if (connection.IsConnect())
            {
                var st      = dtStart.Value.Date.ToString("yyyy-M-dd");
                var end     = dtEnd.Value.Date.ToString("yyyy-M-dd");
                var command = new MySqlCommand("SELECT * FROM `customer` WHERE `customer_join_date` BETWEEN ` CAST('" + dtStart + "' AS DATE) AND CAST('" + dtEnd + "' AS DATE)", connection.Connection);
                var reader  = command.ExecuteReader();
                while (reader.Read())
                {
                }
                customerReport.ReportSource = cr;
                customerReport.Refresh();
            }
        }