private void ucRo_Menu_Reportes1_event_cmdCargar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { idnomina = ucRo_Menu_Reportes1.getIdNominaTipo() == ""?0: Convert.ToInt32(ucRo_Menu_Reportes1.getIdNominaTipo()); iddivision = (ucRo_Menu_Reportes1.getIdDivision() == "")?0: Convert.ToInt32(ucRo_Menu_Reportes1.getIdDivision()); if (iddivision != 0) { listado_Rubos_x_Empleado = Bus_list_Rubros.Get_list_Rubros_X_Empleados(param.IdEmpresa, Convert.ToInt32(idnomina), Convert.ToInt32(iddivision)); } else { listado_Rubos_x_Empleado = Bus_list_Rubros.Get_list_Rubros_X_Empleados(param.IdEmpresa, Convert.ToInt32(idnomina)); } XROL_Rpt014_Rpt reporte = new XROL_Rpt014_Rpt(); reporte.Set_Lista(listado_Rubos_x_Empleado); ReportPrintTool pt = new ReportPrintTool(reporte); reporte.CreateDocument(); pt.ShowPreview(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void BtnGenerar_Reporte_Click(object sender, EventArgs e) { try { listado_Rubos_x_Empleado = Bus_list_Rubros.Get_list_Rubros_X_Empleados(param.IdEmpresa, Convert.ToInt32(cmbNomina.EditValue), Convert.ToInt32(cmbDepartamento.EditValue)); listado_Rubos_x_Empleado = Bus_list_Rubros.Get_list_Rubros_X_Empleados(param.IdEmpresa, Convert.ToInt32(cmbNomina.EditValue)); if (CmbEmpleado.EditValue != null && CmbEmpleado.EditValue != "") { listado_Rubos_x_Empleado = listado_Rubos_x_Empleado.Where(v => v.IdEmpleado == Convert.ToInt32(CmbEmpleado.EditValue)).ToList(); } XROL_Rpt014_Rpt reporte = new XROL_Rpt014_Rpt(); reporte.Set_Lista(listado_Rubos_x_Empleado); ReportPrintTool pt = new ReportPrintTool(reporte); printControl.PrintingSystem = reporte.PrintingSystem; reporte.CreateDocument(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }