Beispiel #1
0
        public virtual ReportDocument CreateReport()
        {
            CrystalReportPagaUpa rpt = new CrystalReportPagaUpa();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
 public virtual ReportDocument CreateReport()
 {
     CrystalReportPagaUpa rpt = new CrystalReportPagaUpa();
     rpt.Site = this.Site;
     return rpt;
 }
Beispiel #3
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Introducir aqu� el c�digo de usuario para inicializar la p�gina

            string sql;
            string post_ncorr;
            string paga_ncorr;
            string imprimirFinanza;
            string paga_ncorr_d;
            string repa_ncorr;
            int fila = 0;
            string tipo_pagare;

            post_ncorr = Request.QueryString["post_ncorr"];
            imprimirFinanza= Request.QueryString["imprimir"];
            repa_ncorr= Request.QueryString["repa_ncorr"];
            tipo_pagare = Request.QueryString["tipo_pagare"];

            if ( imprimirFinanza=="S")
            {

                // para las repactaciones
                if(repa_ncorr !="")
                {

                    //sql = EscribirPagareRepactacion(repa_ncorr,post_ncorr);

                    if (tipo_pagare=="U")
                    {
                        sql = EscribirPagareRepactacionUpa(repa_ncorr,post_ncorr);
                    }
                    else if(tipo_pagare=="M")
                    {
                        sql = EscribirPagareRepactacionMultidebito(repa_ncorr,post_ncorr);
                    }
                    else
                    {
                        sql = EscribirPagareRepactacion(repa_ncorr,post_ncorr);
                    }

                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);
                    fila++;
                }
                else
                {
                    for (int i = 0; i < Request.Form.Count; i++)
                    {
                        paga_ncorr_d="letras[" + fila + "][paga_ncorr]";
                        //Response.Write(paga_ncorr_d+ "<br>");

                        if (Request.Form[i] != "")
                        {
                            paga_ncorr=Request.Form[i];

                            sql = EscribirPagareFinanza(paga_ncorr);
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(datosPagare1);
                            fila++;

                        }

                    }
                }
            }
            else
                {
                if (tipo_pagare=="U")
                {
                    sql = EscribirCodigoPagaUpa(post_ncorr);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);

                }
                else if(tipo_pagare=="M")
                {
                    sql = EscribirCodigoMultidebito(post_ncorr);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);
                }
                else
                {
                    sql = EscribirCodigo(post_ncorr);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);
                }

            }

            CrystalReportPagare reporte = new CrystalReportPagare();
            CrystalReportMultidebito reporteMulti = new CrystalReportMultidebito();
            CrystalReportPagaUpa reporteUpa = new CrystalReportPagaUpa();

            if(tipo_pagare=="U")
            {
                reporteUpa.SetDataSource(datosPagare1);
                VerPagare.ReportSource = reporteUpa;
                ExportarPDF(reporteUpa);
            }
            else if(tipo_pagare=="M")
            {
                reporteMulti.SetDataSource(datosPagare1);
                VerPagare.ReportSource = reporteMulti;
                ExportarPDF(reporteMulti);
            }
            else
            {
                reporte.SetDataSource(datosPagare1);
                VerPagare.ReportSource = reporte;
                ExportarPDF(reporte);
            }
        }