public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crpt_SoLuongMauTheoBarcode rpt = new crpt_SoLuongMauTheoBarcode(); rpt.Site = this.Site; return(rpt); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crpt_SoLuongMauTheoBarcode rpt = new crpt_SoLuongMauTheoBarcode(); rpt.Site = this.Site; return rpt; }
private void SoLuongXetNghiem() { try { string pFromBarcode = dtpDatePrintFrom.Value.ToString("yyMMdd") + txtFromBarcode.Text.Trim().PadLeft(4, '0'); string pToBarcode = dtpDatePrintFrom.Value.ToString("yyMMdd") + txtToBarcode.Text.Trim().PadLeft(4, '0'); m_Report = LAOKHOA_SLMAU_THEOBARCODE(dtpDatePrintFrom.Value, Utility.sDbnull(pFromBarcode), Utility.sDbnull(pToBarcode)).GetDataSet().Tables[0]; if (m_Report.Rows.Count <= 0) { Utility.ShowMsg("Không tìm thấy bản ghi nào", "Thông Báo", MessageBoxIcon.Information); } else { string stringBarcode = string.Format("Từ Barcode {0} đến barcode {1}", pFromBarcode, pToBarcode); var crpt = new crpt_SoLuongMauTheoBarcode(); var frm = new frmPrintPreview("Thống Kê Số Lượng Mẫu", crpt, true, true); crpt.SetDataSource(m_Report); crpt.DataDefinition.FormulaFields["Formula_1"].Text = ""; crpt.SetParameterValue("stringBarcode", stringBarcode); crpt.SetParameterValue("ParentBranchName", globalVariables.ParentBranch_Name); crpt.SetParameterValue("BranchName", globalVariables.Branch_Name); frm.crptViewer.ReportSource = crpt; frm.ShowDialog(); } } catch (Exception ex) { Utility.ShowMsg(ex.ToString(), "Lỗi xuất báo cáo!"); } }