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

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void crystalReportViewer1_ReportRefresh(object source, CrystalDecisions.Windows.Forms.ViewerEventArgs e)
        {
            DTO.fThongKeThucPhamDTO fthongkethucpham = new DTO.fThongKeThucPhamDTO();
            DataTable table = fthongkethucpham.LayDS_THUCPHAM();
            CrystalReport_tkThucPham report = new CrystalReport_tkThucPham();

            report.SetDataSource(table);
            crystalReportViewer1.ReportSource = report;
        }
Beispiel #3
0
        private void frmThongKeThucPham_Shown(object sender, EventArgs e)
        {
            DTO.fThongKeThucPhamDTO fthongkethucpham = new DTO.fThongKeThucPhamDTO();
            DataTable table = fthongkethucpham.LayDS_THUCPHAM();
            CrystalReport_tkThucPham report = new CrystalReport_tkThucPham();

            report.SetDataSource(table);
            crystalReportViewer1.ReportSource = report;
        }
Beispiel #4
0
        private void fthongkeThucPham_Load(object sender, EventArgs e)
        {
            CrystalReport_tkThucPham report = new CrystalReport_tkThucPham();

            CrystalDecisions.Shared.TableLogOnInfo tlicurrent = new CrystalDecisions.Shared.TableLogOnInfo();
            foreach (CrystalDecisions.CrystalReports.Engine.Table tbcurrent in report.Database.Tables)
            {
                tlicurrent = tbcurrent.LogOnInfo;
                tlicurrent.ConnectionInfo.ServerName = Environment.MachineName;
                tbcurrent.ApplyLogOnInfo(tlicurrent);
            }
        }