Esempio n. 1
0
        private void GenerarReporte()
        {
            try
            {
                XROL_Rpt019_rpt Reporte = new XROL_Rpt019_rpt();

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

                pt.AutoShowParametersPanel = false;
                Reporte.Parameters["idNominaTipo"].Value      = cmbnomina.EditValue;
                Reporte.Parameters["idNominaTipoLiqui"].Value = cmbnominaTipo.EditValue;
                Reporte.Parameters["IdDepartamento"].Value    = cmb_Departamento.EditValue == "" ? 0 : Convert.ToInt32(cmb_Departamento.EditValue);
                Reporte.Parameters["fecha_inicio"].Value      = dtp_fecha_inicio.EditValue;
                Reporte.Parameters["fecha_fin"].Value         = dtp_fecha_fin.EditValue;

                printControlReporte.PrintingSystem = Reporte.PrintingSystem;
                Reporte.CreateDocument();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString());
            }
        }
Esempio n. 2
0
        private void GenerarReporte()
        {
            try
            {
                XROL_Rpt019_rpt Reporte = new XROL_Rpt019_rpt();

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

                pt.AutoShowParametersPanel = false;
                Reporte.Parameters["idNominaTipo"].Value      = ucRo_Menu.getIdNominaTipo() == ""?"0":ucRo_Menu.getIdNominaTipo();
                Reporte.Parameters["idNominaTipoLiqui"].Value = ucRo_Menu.getIdNominaTipoLiqui() == "" ? "0" : ucRo_Menu.getIdNominaTipoLiqui();

                Reporte.Parameters["fecha_inicio"].Value = ucRo_Menu.getFechaInicial();
                Reporte.Parameters["fecha_fin"].Value    = ucRo_Menu.getFechaFinal();

                Reporte.CreateDocument();
                Reporte.ShowPreview();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString());
            }
        }