Пример #1
0
        public virtual ReportDocument CreateReport()
        {
            ReporteLaAraucana2014 rpt = new ReporteLaAraucana2014();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            string sql;
            string post_ncorr;
            string post_nuevo;

            post_ncorr = Request.QueryString["post_ncorr"];
            post_nuevo = Request.QueryString["post_nuevo"];

            //post_ncorr = "11406";
            //post_ncorr = "51364";
            //post_ncorr = "56914";
            //post_nuevo="P";

            //string[] informe = new string[4] {"ORIGINAL","DUPLICADO","TRIPLICADO","CUADRIPLICADO"};
            //string[] informe = new string[2] {"ORIGINAL","DUPLICADO"};
            string[] informe = new string[1] {
                "ORIGINAL"
            };

            CrystalReportContrato        reporte                = new CrystalReportContrato();
            CrystalReportContratoAntiguo reporteAntiguo         = new CrystalReportContratoAntiguo();
            ReporteContadoresAntiguo     reporteContadorAntiguo = new ReporteContadoresAntiguo();
            ReporteContadoresNuevo       reporteContadorNuevo   = new ReporteContadoresNuevo();
            ReporteMagister            Magister = new ReporteMagister();
            ReportePostgradoMagister   reportePostgradoMagister = new ReportePostgradoMagister();
            ReportePostgradov2         reportev2                = new ReportePostgradov2();
            ReporteLaAraucana          reporteAraucana          = new ReporteLaAraucana();
            ReporteLaAraucanaConce     reporteAraucanaConce     = new ReporteLaAraucanaConce();
            ReporteLaAraucana2014      reporteAraucana2014      = new ReporteLaAraucana2014();      // Las Condes (LAL2014)
            ReporteLaAraucanaConce2014 reporteAraucanaConce2014 = new ReporteLaAraucanaConce2014(); // Concepcion LAC2014)
            ReportePostgrado2014       reportePostgrado2014     = new ReportePostgrado2014();
            ReporteLaAraucana2015      reporteAraucana2015      = new ReporteLaAraucana2015();      // Concepcion LAC2015)

            for (int i = 0; i < 1; i++)
            {
                sql = EscribirCodigo(post_ncorr, i, informe[i]);
                oleDbDataAdapter1.SelectCommand.CommandTimeout = 9000;
                oleDbDataAdapter1.SelectCommand.CommandText    = sql;
                oleDbDataAdapter1.Fill(datosContrato1);
            }

            switch (post_nuevo)
            {
            case "N":
                reporteAntiguo.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporteAntiguo;
                ExportarPDF(reporteAntiguo);
                break;

            case "S":
                reporte.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporte;
                ExportarPDF(reporte);
                break;

            case "CN":
                reporteContadorNuevo.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporteContadorNuevo;
                ExportarPDF(reporteContadorNuevo);
                break;

            case "CA":                             //contratos contador autditor
                reporteContadorAntiguo.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporteContadorAntiguo;
                ExportarPDF(reporteContadorAntiguo);
                break;

            case "P":                             //contratos magister
                Magister.SetDataSource(datosContrato1);
                VerContrato.ReportSource = Magister;
                ExportarPDF(Magister);
                break;

            case "PM":                             //contratos postgrado y magister
                reportePostgradoMagister.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reportePostgradoMagister;
                ExportarPDF(reportePostgradoMagister);
                break;

            case "PV2":                             //postgrado version dos
                reportev2.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reportev2;
                ExportarPDF(reportev2);
                break;

            case "LA":                             // la araucana las condes
                reporteAraucana.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporteAraucana;
                ExportarPDF(reporteAraucana);
                break;

            case "LAC":                             // la araucana de concepcion
                reporteAraucanaConce.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporteAraucanaConce;
                ExportarPDF(reporteAraucanaConce);
                break;

            case "LAL2014":                             // la araucana 2014 - Las Condes-
                reporteAraucana2014.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporteAraucana2014;
                ExportarPDF(reporteAraucana2014);
                break;

            case "LAC2014":                             // la araucana 2014 - Concepcion -
                reporteAraucanaConce2014.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporteAraucanaConce2014;
                ExportarPDF(reporteAraucanaConce2014);
                break;

            case "PG2014":                             // Postgrado 2014
                reportePostgrado2014.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reportePostgrado2014;
                ExportarPDF(reportePostgrado2014);
                break;

            case "LAC2015":                             // la araucana 2015 - Concepcion -
                reporteAraucana2015.SetDataSource(datosContrato1);
                VerContrato.ReportSource = reporteAraucana2015;
                ExportarPDF(reporteAraucana2015);
                break;
            }
        }
 public virtual ReportDocument CreateReport()
 {
     ReporteLaAraucana2014 rpt = new ReporteLaAraucana2014();
     rpt.Site = this.Site;
     return rpt;
 }
Пример #4
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            string sql;
            string post_ncorr;
            string post_nuevo;
            post_ncorr = Request.QueryString["post_ncorr"];
            post_nuevo = Request.QueryString["post_nuevo"];

            //post_ncorr = "11406";
            //post_ncorr = "51364";
            //post_ncorr = "56914";
            //post_nuevo="P";

            //string[] informe = new string[4] {"ORIGINAL","DUPLICADO","TRIPLICADO","CUADRIPLICADO"};
            //string[] informe = new string[2] {"ORIGINAL","DUPLICADO"};
            string[] informe = new string[1] {"ORIGINAL"};

            CrystalReportContrato reporte = new CrystalReportContrato();
            CrystalReportContratoAntiguo reporteAntiguo = new CrystalReportContratoAntiguo();
            ReporteContadoresAntiguo reporteContadorAntiguo = new ReporteContadoresAntiguo();
            ReporteContadoresNuevo reporteContadorNuevo = new ReporteContadoresNuevo();
            ReporteMagister Magister = new ReporteMagister();
            ReportePostgradoMagister reportePostgradoMagister = new ReportePostgradoMagister();
            ReportePostgradov2 reportev2 = new ReportePostgradov2();
            ReporteLaAraucana reporteAraucana = new ReporteLaAraucana();
            ReporteLaAraucanaConce reporteAraucanaConce = new ReporteLaAraucanaConce();
            ReporteLaAraucana2014 reporteAraucana2014 = new ReporteLaAraucana2014(); // Las Condes (LAL2014)
            ReporteLaAraucanaConce2014 reporteAraucanaConce2014 = new ReporteLaAraucanaConce2014(); // Concepcion LAC2014)
            ReportePostgrado2014 reportePostgrado2014 = new ReportePostgrado2014();
            ReporteLaAraucana2015 reporteAraucana2015 = new ReporteLaAraucana2015(); // Concepcion LAC2015)

            for (int i=0; i<1; i++)
            {
                sql = EscribirCodigo(post_ncorr, i, informe[i]);
                oleDbDataAdapter1.SelectCommand.CommandTimeout=9000;
                oleDbDataAdapter1.SelectCommand.CommandText = sql;
                oleDbDataAdapter1.Fill(datosContrato1);
            }

                switch (post_nuevo)
                {
                    case "N":
                        reporteAntiguo.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporteAntiguo;
                        ExportarPDF(reporteAntiguo);
                        break;
                    case "S":
                        reporte.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporte;
                        ExportarPDF(reporte);
                        break;
                    case "CN":
                        reporteContadorNuevo.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporteContadorNuevo;
                        ExportarPDF(reporteContadorNuevo);
                        break;
                    case "CA": //contratos contador autditor
                        reporteContadorAntiguo.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporteContadorAntiguo;
                        ExportarPDF(reporteContadorAntiguo);
                        break;
                    case "P": //contratos magister
                        Magister.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = Magister;
                        ExportarPDF(Magister);
                        break;
                    case "PM": //contratos postgrado y magister
                        reportePostgradoMagister.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reportePostgradoMagister;
                        ExportarPDF(reportePostgradoMagister);
                        break;
                    case "PV2": //postgrado version dos
                        reportev2.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reportev2;
                        ExportarPDF(reportev2);
                        break;
                    case "LA": // la araucana las condes
                        reporteAraucana.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporteAraucana;
                        ExportarPDF(reporteAraucana);
                        break;
                    case "LAC": // la araucana de concepcion
                        reporteAraucanaConce.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporteAraucanaConce;
                        ExportarPDF(reporteAraucanaConce);
                        break;
                    case "LAL2014": // la araucana 2014 - Las Condes-
                        reporteAraucana2014.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporteAraucana2014;
                        ExportarPDF(reporteAraucana2014);
                        break;
                    case "LAC2014": // la araucana 2014 - Concepcion -
                        reporteAraucanaConce2014.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporteAraucanaConce2014;
                        ExportarPDF(reporteAraucanaConce2014);
                        break;
                    case "PG2014": // Postgrado 2014
                        reportePostgrado2014.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reportePostgrado2014;
                        ExportarPDF(reportePostgrado2014);
                        break;
                    case "LAC2015": // la araucana 2015 - Concepcion -
                        reporteAraucana2015.SetDataSource(datosContrato1);
                        VerContrato.ReportSource = reporteAraucana2015;
                        ExportarPDF(reporteAraucana2015);
                        break;
                }
        }