예제 #1
0
 private void frmInHoaDon_Load(object sender, EventArgs e)
 {
     //this.rptvHoaDon.RefreshReport();
     //ReportDocument cryRpt = new ReportDocument();
     //string[] _str = Application.StartupPath.Split('\\');
     //string path = String.Join("\\", _str.Take(_str.Count() - 2).ToArray());
     //cryRpt.Load(path + @"\Report\rpHoaDonThanhToan.rpt");
     //cryRpt.SetParameterValue("MaPhieu", MaPhieu);
     //cryRpt.SetParameterValue("SoNgay", SoNgay);
     //cryRpt.SetParameterValue("SumPT", SumPT);
     //cryRpt.SetParameterValue("SumCK", SumCK);
     //cryRpt.SetParameterValue("PhiDV", PhiDV);
     //rptvHoaDon.ReportSource = cryRpt;
     //rptvHoaDon.Refresh();
     //frmInHoaDon frm = new frmInHoaDon();
     //frm.MaPhieu = MaPhieu;
     var rp = new Report.rpHoaDonThanhToan();
     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.ReportOptions.EnableSaveDataWithReport = false;
     rp.SetParameterValue("MaPhieu", MaPhieu);
     rp.SetParameterValue("SoNgay", SoNgay);
     rp.SetParameterValue("SumPT", SumPT);
     rp.SetParameterValue("SumCK", SumCK);
     rp.SetParameterValue("PhiDV", PhiDV);
     rptvHoaDon.ReportSource = rp;
     rptvHoaDon.Refresh();
 }
예제 #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rpHoaDonThanhToan rpt = new rpHoaDonThanhToan();
     rpt.Site = this.Site;
     return rpt;
 }