Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ThongKe rpt = new ThongKe();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            ThongKe rpt = new ThongKe();

            rpt.SetDataSource(data);
            decimal doanhthu = data.Sum(x => x.DoanhThu);

            rpt.SetParameterValue("_doanhthu", VNCurrency.ToString(doanhthu));
            rpt.SetParameterValue("_doanhthuso", String.Format("{0:C}", doanhthu).Replace("$", "").Split('.')[0] + "đ");
            rpt.SetParameterValue("_start", start.ToString("dd/MM/yyyy"));
            rpt.SetParameterValue("_end", end.ToString("dd/MM/yyyy"));
            this.crystalReportViewer1.ReportSource = rpt;
        }