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

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void frmReport_DT_Load(object sender, EventArgs e)
        {
            Report_DT objRpt = new Report_DT();

            objRpt.SetDataSource(rp.report_DT().Tables[1]);
            crystalReportViewer_DT.ReportSource = objRpt;
            crystalReportViewer_DT.Refresh();
        }
Пример #3
0
        private void frmReport_DT_Load(object sender, EventArgs e)
        {
            SqlConnection connect;

            connect = new SqlConnection(@"server=.\SQLEXPRESS; Database=QuanLiCaPhe;integrated security=true");
            connect.Open();
            SqlDataAdapter da    = new SqlDataAdapter();
            string         query = "SELECT * FROM tblDoanhThu";
            SqlDataAdapter dscm  = new SqlDataAdapter(query, connect);
            DSDoanhThu     ds    = new DSDoanhThu();

            dscm.Fill(ds, "tblDoanhThu");
            connect.Close();
            Report_DT objRpt = new Report_DT();

            objRpt.SetDataSource(ds.Tables[1]);
            crystalReportViewer_DT.ReportSource = objRpt;
            crystalReportViewer_DT.Refresh();
        }