Beispiel #1
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rpTheoQuy rpt = new rpTheoQuy();
     rpt.Site = this.Site;
     return rpt;
 }
Beispiel #2
0
 private void btnDTQuy_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     //ReportDocument cryRpt = new ReportDocument();
     //string[] _str = Application.StartupPath.Split('\\');
     //string path = String.Join("\\", _str.Take(_str.Count() - 2).ToArray());
     //cryRpt.Load(path + @"\Report\rpTheoQuy.rpt");
     //frmNgay _frm = new frmNgay();
     //_frm.StartPosition = FormStartPosition.CenterScreen;
     //_frm.dtpNgayKT.Enabled = false;
     //_frm.txtMa.Enabled = false;
     //_frm.Check = false;
     //_frm.ShowDialog();
     //cryRpt.SetParameterValue("Nam", _frm.NgayBatDau);
     //crv.ReportSource = cryRpt;
     //crv.Refresh();
     var rp = new Report.rpTheoQuy();
     frmNgay _frm = new frmNgay();
     _frm.StartPosition = FormStartPosition.CenterScreen;
     _frm.dtpNgayKT.Enabled = false;
     _frm.txtMa.Enabled = false;
     _frm.Check = false;
     _frm.ShowDialog();
     CrystalDecisions.Shared.TableLogOnInfo info;
     info = rp.Database.Tables[0].LogOnInfo;
     info.ConnectionInfo.ServerName = "192.168.1.39";
     info.ConnectionInfo.DatabaseName = "QLKS";
     rp.Database.Tables[0].ApplyLogOnInfo(info);
     rp.SetParameterValue("Nam", _frm.NgayBatDau);
     crv.ReportSource = rp;
 }