public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReporteHorasExtra rpt = new ReporteHorasExtra(); rpt.Site = this.Site; return(rpt); }
public ReporteHorasExtras() { InitializeComponent(); var _horasExtrasBL = new HorasExtrasBL(); var _trabajadoresBL = new TrabajadoresBL(); var _cargoBL = new CargosBL(); var _metododePagoBL = new MetodoPagoBL(); var _jornadaBL = new JornadaBL(); var bindingSource = new BindingSource(); bindingSource.DataSource = _horasExtrasBL.ObtenerHoraExtras(); var bindingSource2 = new BindingSource(); bindingSource2.DataSource = _trabajadoresBL.ObtenerTrabajador(); var bindingSource3 = new BindingSource(); bindingSource3.DataSource = _cargoBL.ObtenerCargos(); var bindingSource4 = new BindingSource(); bindingSource4.DataSource = _metododePagoBL.ObtenerMetodoPagos(); var bindingSource5 = new BindingSource(); bindingSource5.DataSource = _jornadaBL.ObtenerJornadas(); var reporte = new ReporteHorasExtra(); //reporte.SetDataSource(bindingSource); reporte.Database.Tables["HoraExtra"].SetDataSource(bindingSource); reporte.Database.Tables["Cargo"].SetDataSource(bindingSource3); reporte.Database.Tables["MetodoPago"].SetDataSource(bindingSource4); reporte.Database.Tables["Jornada"].SetDataSource(bindingSource5); crystalReportViewer1.ReportSource = reporte; crystalReportViewer1.RefreshReport(); }