Exemple #1
0
        private void pu_GenerarReporte()
        {
            try
            {
                XROL_Rpt022_Rpt Reporte = new XROL_Rpt022_Rpt();

                Reporte.RequestParameters = false;
                ReportPrintTool pt = new ReportPrintTool(Reporte);

                pt.AutoShowParametersPanel = false;
                Reporte.Parameters["s_fechaInicial"].Value   = Convert.ToDateTime(dtp_fecha_inicio.EditValue);
                Reporte.Parameters["s_fechaFinal"].Value     = Convert.ToDateTime(dtp_fecha_fin.EditValue);
                Reporte.Parameters["p_IdDepartamento"].Value = cmb_Departamento.EditValue == "" ? 0 : Convert.ToInt32(cmb_Departamento.EditValue);
                Reporte.Parameters["p_IdEmpleado"].Value     = cmbEmpleados.EditValue == "" ? 0 : Convert.ToInt32(cmbEmpleados.EditValue);
                Reporte.Parameters["p_idnomina"].Value       = cmbnomina.EditValue == "" ? 0 : Convert.ToInt32(cmbnomina.EditValue);


                printControlReporte.PrintingSystem = Reporte.PrintingSystem;
                Reporte.CreateDocument();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }
Exemple #2
0
        private void pu_GenerarReporte()
        {
            try
            {
                XROL_Rpt022_Rpt Reporte = new XROL_Rpt022_Rpt();

                Reporte.RequestParameters = false;
                ReportPrintTool pt = new ReportPrintTool(Reporte);

                pt.AutoShowParametersPanel = false;
                Reporte.Parameters["s_fechaInicial"].Value = ucRo_Menu_Reportes1.getFechaInicial() == ""?DateTime.Now.Date: Convert.ToDateTime(ucRo_Menu_Reportes1.getFechaInicial());
                Reporte.Parameters["s_fechaFinal"].Value   = ucRo_Menu_Reportes1.getFechaFinal() == "" ? DateTime.Now.Date : Convert.ToDateTime(ucRo_Menu_Reportes1.getFechaFinal());
                Reporte.Parameters["p_IdEmpleado"].Value   = ucRo_Menu_Reportes1.getIdEmpleado() == 0?0: Convert.ToInt32(ucRo_Menu_Reportes1.getIdEmpleado());


                printControlReporte.PrintingSystem = Reporte.PrintingSystem;
                Reporte.CreateDocument();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }