public void imprimirReporteAplicacion(string usuario, int Modulo, int Aplicacion)
        {
            PropiedadReporteControl propiedadReporteControl = new PropiedadReporteControl();
            PropiedadReporte        propiedadReporte        =
                propiedadReporteControl.obtenerPropiedadPorUsuarioAplicacion(usuario, Aplicacion, Modulo);

            ReporteAplicacionControl datos = new ReporteAplicacionControl();

            ReporteAplicacion repApp = datos.obtenerReporteApp(Aplicacion, Modulo);
            Reporte           rpt    = repApp.REPORTE;

            string           pathFile = rpt.CONFIGURACION.RUTA + rpt.NOMBRE_ARCHIVO;
            Frm_VistaReporte frmVistaRpt;

            switch (propiedadReporte.IMPRIMIR)
            {
            case 0:
                frmVistaRpt = new Frm_VistaReporte(pathFile, 0);
                frmVistaRpt.Show();
                break;

            case 1:
                frmVistaRpt = new Frm_VistaReporte(pathFile, 1);
                frmVistaRpt.Show();
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        private void Btn_PreView_Click(object sender, EventArgs e)
        {
            string           pathFile    = this.reporte.CONFIGURACION.RUTA + this.reporte.FILENAME;
            Frm_VistaReporte frmVistaRpt = new Frm_VistaReporte(pathFile);

            frmVistaRpt.Show();
        }
        private void Btn_PreView_Click(object sender, EventArgs e)
        {
            try
            {
                string           pathFile    = this.reporte.CONFIGURACION.RUTA + this.reporte.NOMBRE_ARCHIVO;
                Frm_VistaReporte frmVistaRpt = new Frm_VistaReporte(pathFile, 0);
                frmVistaRpt.Show();

                //ImprimirReporte imp = new ImprimirReporte(4, 2);
            }
            catch (Exception ex)
            {
                MessageBox.Show("No se encontro el archivo.");
            }
        }
        public void imprimirReporteModulo(int Reporte, string usuario, int Modulo)
        {
            PropiedadReporteControl propiedadReporteControl = new PropiedadReporteControl();
            PropiedadReporte        propiedadReporte        =
                propiedadReporteControl.obtenerPropiedadPorUsuarioModulo(Reporte, usuario, Modulo);

            ReporteModuloControl reporteMdlControl = new ReporteModuloControl();

            try
            {
                ReporteModulo reporteMdl = reporteMdlControl.obtenerReporteMdl(Modulo, Reporte);
                Reporte       rpt        = reporteMdl.REPORTE;

                string           pathFile = rpt.CONFIGURACION.RUTA + rpt.NOMBRE_ARCHIVO;
                Frm_VistaReporte frmVistaRpt;
                switch (propiedadReporte.IMPRIMIR)
                {
                case 0:
                    frmVistaRpt = new Frm_VistaReporte(pathFile, 0);
                    frmVistaRpt.Show();
                    break;

                case 1:
                    frmVistaRpt = new Frm_VistaReporte(pathFile, 1);
                    //frmVistaRpt.Show();
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString() + "Error en impresion, no se pudo obtener reporte.");
            }
        }