Пример #1
0
        private void pu_GenerarReporte()
        {
            try
            {
                XROL_Rpt020_rpt Reporte = new XROL_Rpt020_rpt();

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

                pt.AutoShowParametersPanel = false;
                Reporte.Parameters["fechaInicial"].Value   = Convert.ToDateTime(dtp_fecha_inicio.EditValue);
                Reporte.Parameters["fechaFinal"].Value     = Convert.ToDateTime(dtp_fecha_fin.EditValue);
                Reporte.Parameters["IdDepartamento"].Value = cmb_Departamento.EditValue == "" ? 0 : Convert.ToInt32(cmb_Departamento.EditValue);
                Reporte.Parameters["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());
                MessageBox.Show(ex.ToString());
            }
        }
Пример #2
0
        private void pu_GenerarReporte()
        {
            try
            {
                XROL_Rpt020_rpt Reporte = new XROL_Rpt020_rpt();

                Reporte.RequestParameters = false;
                Reporte.Parameters["fechaInicial"].Value = Convert.ToDateTime(ucRo_Menu.getFechaInicial());
                Reporte.Parameters["fechaFinal"].Value   = Convert.ToDateTime(ucRo_Menu.getFechaInicial());
                Reporte.Parameters["idnomina"].Value     = ucRo_Menu.getIdNominaTipo() == "" ? 0 : Convert.ToInt32(ucRo_Menu.getIdNominaTipo());
                Reporte.CreateDocument();
                Reporte.ShowPreview();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString());
            }
        }