public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Crpt_BaoCaoMau rpt = new Crpt_BaoCaoMau(); rpt.Site = this.Site; return(rpt); }
private void LoadDataPrint() { if (_tblPatients.Rows.Count <= 0) { MessageBox.Show("Không có dữ liệu để báo cáo", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } int soXN = _tblPatients.Rows.Count; //int TongLoaiXN = (from r in _tblPatients.AsEnumerable() // where r[TTestInfo.Columns.TestTypeId].ToString().Equals(TTestTypeList.Columns.TestTypeId) // select r).Count(); int bNchuaDk = (from r in _tblPatients.AsEnumerable() where r[TTestInfo.Columns.TestStatus].ToString().Equals("20") select r).Count(); int xNchuaDk = (from r in _tblPatients.AsEnumerable() where r[TTestInfo.Columns.TestStatus].ToString().Equals("30") select r).Count(); int xNdaDk = soXN - (xNchuaDk + bNchuaDk); var crpt = new Crpt_BaoCaoMau(); var objForm = new frmPrintPreview("Báo cáo số lượng mẫu", crpt, true, true); crpt.SetDataSource(_tblPatients); crpt.SetParameterValue("ParentBranchName", lablinkhelper.Utilities.gv_sParentBranchName); crpt.SetParameterValue("BranchName", globalVariables.Branch_Name); crpt.SetParameterValue("TongSN", soXN); crpt.SetParameterValue("XNdaDK", xNdaDk); crpt.SetParameterValue("XNchuaDK", xNchuaDk); crpt.SetParameterValue("BNchuaDK", bNchuaDk); // crpt.SetParameterValue("TongSoLoaiXN",TongLoaiXN); string strFromDateToDate = dtpFromDate.Value == dtpToDate.Value ? string.Format("Ngày {0}", dtpFromDate.Value.ToString("dd/MM/yyyy")) : string.Format("Từ ngày {0} đến ngày {1}", dtpFromDate.Value.ToString("dd/MM/yyyy"), dtpToDate.Value.ToString("dd/MM/yyyy")); crpt.SetParameterValue("Date", strFromDateToDate); objForm.ShowDialog(); // MessageBox.Show(soXN.ToString()); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Crpt_BaoCaoMau rpt = new Crpt_BaoCaoMau(); rpt.Site = this.Site; return rpt; }