Exemplo n.º 1
0
        public virtual ReportDocument CreateReport()
        {
            CrystalReport5 rpt = new CrystalReport5();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            string sql, envio, periodo, informe, banco, rut_alumnos = "", todos = "";

            periodo = Request.QueryString["periodo"];
            envio   = Request.QueryString["folio_envio"];
            informe = Request.QueryString["informe"];
            banco   = Request.QueryString["banco"];
            todos   = Request.QueryString["todos"];

            switch (informe)
            {
            case "1":                              //CARTAS GUIAS
            {
                rut_alumnos = Filtrar_Carta_Guia();
                sql         = Crear_Consulta_Carta_Guia(envio, periodo, rut_alumnos, todos);
                switch (banco)
                {
                case "1":                                  // carta guia banco BCI
                    rep_carta_guia_bci CartaGuiaBCI = new rep_carta_guia_bci();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaBCI.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaBCI;
                    ExportarPDF(CartaGuiaBCI);
                    break;

                case "8":                                   //carta guia banco SANTIAGO
                    CrystalReport4 CartaGuiaSantiago = new CrystalReport4();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaSantiago.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaSantiago;
                    ExportarPDF(CartaGuiaSantiago);
                    break;

                case "9":                                   //carta guia banco BHIF
                    CrystalReport5 CartaGuiaBHIF = new CrystalReport5();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaBHIF.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaBHIF;
                    ExportarPDF(CartaGuiaBHIF);
                    break;

                case "10":                                   //carta guia banco BBVA
                    CrystalReport5 CartaGuiaBBVA = new CrystalReport5();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaBBVA.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaBBVA;
                    ExportarPDF(CartaGuiaBBVA);
                    break;
                }                                       // end switch banco
                break;
            }

            case "2":                               // LISTADO DETALLE DE LETRAS
            {
                rep_detalle_letras ListadoLetras = new rep_detalle_letras();
                sql = Crear_Consulta_Listado_Letras(envio, periodo);
                oleDbDataAdapter2.SelectCommand.CommandText = sql;
                oleDbDataAdapter2.Fill(dataSet21);
                ListadoLetras.SetDataSource(dataSet21);
                CrystalReportViewer1.ReportSource = ListadoLetras;
                ExportarPDF(ListadoLetras);
                break;
            }

            case "3":                              //DETALLE DE LETRAS AGRUPADO
                CrystalReport3 ListadoAgrupado = new CrystalReport3();
                sql = Crear_Consulta_Listado_Letras_Agrupado(envio, periodo);
                oleDbDataAdapter3.SelectCommand.CommandText = sql;
                oleDbDataAdapter3.Fill(dataSet31);
                ListadoAgrupado.SetDataSource(dataSet31);
                CrystalReportViewer1.ReportSource = ListadoAgrupado;
                ExportarPDF(ListadoAgrupado);
                break;
            }                                // end switch tipo de informe
        }
Exemplo n.º 3
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            string sql, envio, periodo, informe, banco, rut_alumnos = "", todos = "";

            periodo = Request.QueryString["periodo"];
            envio   = Request.QueryString["folio_envio"];
            informe = Request.QueryString["informe"];
            banco   = Request.QueryString["banco"];
            todos   = Request.QueryString["todos"];

            // datos de pruebas

            /*
             * periodo = "164";
             * envio = "357";
             * informe = "1";
             * banco= "3";
             * todos="NO";
             */

            switch (informe)
            {
            case "1":                              //CARTAS GUIAS
            {
                rut_alumnos = Filtrar_Carta_Guia();
                sql         = Crear_Consulta_Carta_Guia(envio, periodo, rut_alumnos, todos);
                //Response.Write(sql);
                //Response.Flush();

                switch (banco)
                {
                case "1":                                  // carta guia banco BCI
                    rep_carta_guia_bci CartaGuiaBCI = new rep_carta_guia_bci();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaBCI.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaBCI;
                    ExportarPDF(CartaGuiaBCI);
                    break;

                case "2":                                   //carta guia banco Chile
                    CartaBancoChile CartaGuiaChile = new CartaBancoChile();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaChile.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaChile;
                    ExportarPDF(CartaGuiaChile);
                    break;

                case "3":                                   //carta guia banco SANTANDER - SANTIAGO
                    CrystalReport4 CartaGuiaSantiago = new CrystalReport4();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaSantiago.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaSantiago;
                    ExportarPDF(CartaGuiaSantiago);
                    break;


                case "4":                                   //carta guia banco (Scotiabank Sud-Americano)
                    CrystalReport5 CartaGuiaScotiabank = new CrystalReport5();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaScotiabank.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaScotiabank;
                    ExportarPDF(CartaGuiaScotiabank);
                    break;

                case "17":                                   //carta guia banco (Scotiabank Sud-Americano)
                    CartaCorpBanca CartaGuiaCorpBanca = new CartaCorpBanca();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaCorpBanca.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaCorpBanca;
                    ExportarPDF(CartaGuiaCorpBanca);
                    break;

                default:
                    //carta guia Otros Bancos
                    CrystalReport5 CartaGuiaOtrosBancos = new CrystalReport5();
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(dataSet11);
                    CartaGuiaOtrosBancos.SetDataSource(dataSet11);
                    CrystalReportViewer1.ReportSource = CartaGuiaOtrosBancos;
                    ExportarPDF(CartaGuiaOtrosBancos);
                    break;
                }                               // end switch banco
                break;
            }

            case "2":                               // LISTADO DETALLE DE LETRAS
            {
                rep_detalle_letras ListadoLetras = new rep_detalle_letras();
                sql = Crear_Consulta_Listado_Letras(envio, periodo);
                oleDbDataAdapter2.SelectCommand.CommandText = sql;
                oleDbDataAdapter2.Fill(dataSet21);
                ListadoLetras.SetDataSource(dataSet21);
                CrystalReportViewer1.ReportSource = ListadoLetras;
                ExportarPDF(ListadoLetras);
                break;
            }

            case "3":                              //DETALLE DE LETRAS AGRUPADO
                CrystalReport3 ListadoAgrupado = new CrystalReport3();
                sql = Crear_Consulta_Listado_Letras_Agrupado(envio, periodo);
                oleDbDataAdapter3.SelectCommand.CommandText = sql;
                oleDbDataAdapter3.Fill(dataSet31);
                ListadoAgrupado.SetDataSource(dataSet31);
                CrystalReportViewer1.ReportSource = ListadoAgrupado;
                ExportarPDF(ListadoAgrupado);
                break;
            }                                // end switch tipo de informe
        }
Exemplo n.º 4
0
 public virtual ReportDocument CreateReport()
 {
     CrystalReport5 rpt = new CrystalReport5();
     rpt.Site = this.Site;
     return rpt;
 }
Exemplo n.º 5
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            string sql, envio, periodo, informe, banco, rut_alumnos = "", todos = "";

            periodo = Request.QueryString["periodo"];
            envio	= Request.QueryString["folio_envio"];
            informe = Request.QueryString["informe"];
            banco = Request.QueryString["banco"];
            todos = Request.QueryString["todos"];

            // datos de pruebas

            /*
             periodo = "164";
             envio = "357";
             informe = "1";
             banco= "3";
             todos="NO";
             */

            switch (informe)
            {
                case "1":          //CARTAS GUIAS
                {
                    rut_alumnos = Filtrar_Carta_Guia ();
                    sql = Crear_Consulta_Carta_Guia(envio, periodo, rut_alumnos, todos);
                    //Response.Write(sql);
                    //Response.Flush();

                    switch (banco)
                    {
                        case "1":  // carta guia banco BCI
                            rep_carta_guia_bci CartaGuiaBCI = new rep_carta_guia_bci();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaBCI.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaBCI;
                            ExportarPDF(CartaGuiaBCI);
                            break;

                        case "2":   //carta guia banco Chile
                            CartaBancoChile CartaGuiaChile = new CartaBancoChile();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaChile.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaChile;
                            ExportarPDF(CartaGuiaChile);
                            break;

                        case "3":   //carta guia banco SANTANDER - SANTIAGO
                            CrystalReport4 CartaGuiaSantiago = new CrystalReport4();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaSantiago.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaSantiago;
                            ExportarPDF(CartaGuiaSantiago);
                            break;

                        case "4":   //carta guia banco (Scotiabank Sud-Americano)
                            CrystalReport5 CartaGuiaScotiabank = new CrystalReport5();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaScotiabank.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaScotiabank;
                            ExportarPDF(CartaGuiaScotiabank);
                            break;

                        case "17":   //carta guia banco (Scotiabank Sud-Americano)
                            CartaCorpBanca CartaGuiaCorpBanca = new CartaCorpBanca();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaCorpBanca.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaCorpBanca;
                            ExportarPDF(CartaGuiaCorpBanca);
                            break;

                        default:
                               //carta guia Otros Bancos
                            CrystalReport5 CartaGuiaOtrosBancos = new CrystalReport5();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaOtrosBancos.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaOtrosBancos;
                            ExportarPDF(CartaGuiaOtrosBancos);
                            break;

                    }       // end switch banco
                 break;
                }

                case "2":           // LISTADO DETALLE DE LETRAS
                {
                    rep_detalle_letras ListadoLetras = new rep_detalle_letras();
                    sql = Crear_Consulta_Listado_Letras (envio,periodo);
                    oleDbDataAdapter2.SelectCommand.CommandText = sql;
                    oleDbDataAdapter2.Fill(dataSet21);
                    ListadoLetras.SetDataSource(dataSet21);
                    CrystalReportViewer1.ReportSource = ListadoLetras;
                    ExportarPDF(ListadoLetras);
                    break;
                }

                case "3":          //DETALLE DE LETRAS AGRUPADO
                    CrystalReport3 ListadoAgrupado = new CrystalReport3();
                    sql = Crear_Consulta_Listado_Letras_Agrupado(envio,periodo);
                    oleDbDataAdapter3.SelectCommand.CommandText = sql;
                    oleDbDataAdapter3.Fill(dataSet31);
                    ListadoAgrupado.SetDataSource(dataSet31);
                    CrystalReportViewer1.ReportSource = ListadoAgrupado;
                    ExportarPDF(ListadoAgrupado);
                    break;
            }                    // end switch tipo de informe
        }
Exemplo n.º 6
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            string sql, envio, periodo, informe, banco, rut_alumnos = "", todos = "";

            periodo = Request.QueryString["periodo"];
            envio = Request.QueryString["folio_envio"];
            informe = Request.QueryString["informe"];
            banco = Request.QueryString["banco"];
            todos = Request.QueryString["todos"];

            switch (informe)
            {
                case "1":          //CARTAS GUIAS
                {
                    rut_alumnos = Filtrar_Carta_Guia ();
                    sql = Crear_Consulta_Carta_Guia (envio, periodo, rut_alumnos, todos);
                    switch (banco)
                    {
                        case "1":  // carta guia banco BCI
                            rep_carta_guia_bci CartaGuiaBCI = new rep_carta_guia_bci();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaBCI.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaBCI;
                            ExportarPDF(CartaGuiaBCI);
                            break;

                        case "8":   //carta guia banco SANTIAGO
                            CrystalReport4 CartaGuiaSantiago = new CrystalReport4();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaSantiago.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaSantiago;
                            ExportarPDF(CartaGuiaSantiago);
                            break;

                        case "9":   //carta guia banco BHIF
                            CrystalReport5 CartaGuiaBHIF = new CrystalReport5();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaBHIF.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaBHIF;
                            ExportarPDF(CartaGuiaBHIF);
                            break;
                        case "10":   //carta guia banco BBVA
                            CrystalReport5 CartaGuiaBBVA = new CrystalReport5();
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(dataSet11);
                            CartaGuiaBBVA.SetDataSource(dataSet11);
                            CrystalReportViewer1.ReportSource = CartaGuiaBBVA;
                            ExportarPDF(CartaGuiaBBVA);
                            break;
                    }               // end switch banco
                 break;
                }

                case "2":           // LISTADO DETALLE DE LETRAS
                {
                    rep_detalle_letras ListadoLetras = new rep_detalle_letras();
                    sql = Crear_Consulta_Listado_Letras (envio,periodo);
                    oleDbDataAdapter2.SelectCommand.CommandText = sql;
                    oleDbDataAdapter2.Fill(dataSet21);
                    ListadoLetras.SetDataSource(dataSet21);
                    CrystalReportViewer1.ReportSource = ListadoLetras;
                    ExportarPDF(ListadoLetras);
                    break;
                }

                case "3":          //DETALLE DE LETRAS AGRUPADO
                    CrystalReport3 ListadoAgrupado = new CrystalReport3();
                    sql = Crear_Consulta_Listado_Letras_Agrupado(envio,periodo);
                    oleDbDataAdapter3.SelectCommand.CommandText = sql;
                    oleDbDataAdapter3.Fill(dataSet31);
                    ListadoAgrupado.SetDataSource(dataSet31);
                    CrystalReportViewer1.ReportSource = ListadoAgrupado;
                    ExportarPDF(ListadoAgrupado);
                    break;
            }                    // end switch tipo de informe
        }