public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReporteComprobante rpt = new ReporteComprobante(); rpt.Site = this.Site; return(rpt); }
private void GenerarReporte() { List <ComprobantesDataSourceShow> comproban = new List <ComprobantesDataSourceShow>(); comproban = this.negocioComprobante.CargarInforme(); List <ComprobantesDataSourceReporte> comprobR = new List <ComprobantesDataSourceReporte>(); this.Size = new Size(840, 566); foreach (ComprobantesDataSourceShow item in comproban) { ComprobantesDataSourceReporte comproR = new ComprobantesDataSourceReporte(); comproR.Codigo = item.Codigo ?? default(int); comproR.Descricompro = item.Descricompro; comproR.Consecutivo = item.Consecutivo == true ? "SI" : "NO"; comproR.Numerosigui = item.Numerosigui ?? default(int); comproR.Codigootra = item.Codigootra; comprobR.Add(comproR); } ReporteComprobante reportcompr = new ReporteComprobante(); reportcompr.SetDataSource(comprobR); crystal_reportcompro.ReportSource = reportcompr; }