public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { SaleReceipt rpt = new SaleReceipt(); rpt.Site = this.Site; return(rpt); }
public ReportClass GetReport(tblDocumentCommon doc, List <DocumentAdapter> reportSource = null) { List <DocumentAdapter> xSource = reportSource; if (xSource == null) { DocumentAdapter xPrintAdapter = new DocumentAdapter(doc); xSource = new List <DocumentAdapter>(1); xSource.Add(xPrintAdapter); } ReportClass xReport; if (doc is tblDocumentService) { xReport = new DocService(); } else if (doc is tblDocumentProduct) { xReport = new DocSale(); } else if (doc is tblDocumentSalesReceipt) { xReport = new SaleReceipt(); } else { throw new Exception("Не определен шаблон документа"); } xReport.SetDataSource(xSource); return(xReport); }