Beispiel #1
0
        /*
         *
         * private string Crear_Consulta_Listado_Letras(string envio, string periodo)
         * {
         *      string sql;
         *      sql = "select a.envi_ncorr, b.ting_ccod, b.ding_ndocto as c_ding_ndocto, b.ingr_ncorr ,b.ding_ndocto, \n";
         *      sql = sql +  "        c.ding_mdocto,c.ding_mdetalle, a.envi_fenvio, d.ingr_fpago, convert(varchar,d.ingr_fpago,103) as ingr_fpago, \n";
         *      sql = sql +  "        c.ding_fdocto, c1.edin_ccod, c1.edin_tdesc, cast(e.pers_nrut as varchar) + '-' + e.pers_xdv as rut_alumno, \n";
         *      sql = sql +  "        protic.obtener_nombre(f.pers_ncorr,'n') as nombre_apoderado,   \n";
         *      sql = sql +  "        (select ccte_tdesc from  cuentas_corrientes where ccte_ccod = a.ccte_ccod) ccte_tdesc, (select inen_tdesc from instituciones_envio where inen_ccod = a.inen_ccod) as inen_tdesc, cast(f.pers_tnombre as varchar) + ' ' + f.pers_tape_paterno as nombre_apoderado  \n";
         *      sql = sql +  "    from envios a,detalle_envios b,detalle_ingresos c,estados_detalle_ingresos c1, \n";
         *      sql = sql +  "    ingresos d,personas e,personas f \n";
         *      sql = sql +  "    where a.envi_ncorr = b.envi_ncorr \n";
         *      sql = sql +  "    and b.ting_ccod = c.ting_ccod   \n";
         *      sql = sql +  "    and b.ding_ndocto = c.ding_ndocto   \n";
         *      sql = sql +  "    and b.ingr_ncorr = c.ingr_ncorr \n";
         *      sql = sql +  "    and b.edin_ccod = c1.edin_ccod  \n";
         *      sql = sql +  "    and c.ingr_ncorr = d.ingr_ncorr \n";
         *      sql = sql +  "    and d.pers_ncorr = e.pers_ncorr \n";
         *      sql = sql +  "    and c.PERS_NCORR_CODEUDOR *= f.pers_ncorr \n";
         *      sql = sql +  "    and c.DING_NCORRELATIVO = 1 \n";
         *      sql = sql +  "    and cast(a.envi_ncorr as varchar) ='" + envio + "'";
         *      return (sql);
         * }
         *
         */
        private void Page_Load(object sender, System.EventArgs e)
        {
            string sql, envio, periodo;

            periodo = Request.QueryString["periodo"];
            envio   = Request.QueryString["folio_envio"];
            //envio="97";
            //periodo="300";
            CrystalReport1 ListadoAgrupado = new CrystalReport1();

            sql = Crear_Consulta_Listado_Letras(envio, periodo);
            Response.Write(sql);
            //Response.Flush();
            oleDbDataAdapter1.SelectCommand.CommandText = sql;
            oleDbDataAdapter1.Fill(dataSet11);
            ListadoAgrupado.SetDataSource(dataSet11);
            CrystalReportViewer1.ReportSource = ListadoAgrupado;
            ExportarPDF(ListadoAgrupado);
        }
        /*

        private string Crear_Consulta_Listado_Letras(string envio, string periodo)
        {
            string sql;
            sql = "select a.envi_ncorr, b.ting_ccod, b.ding_ndocto as c_ding_ndocto, b.ingr_ncorr ,b.ding_ndocto, \n";
            sql = sql +  "        c.ding_mdocto,c.ding_mdetalle, a.envi_fenvio, d.ingr_fpago, convert(varchar,d.ingr_fpago,103) as ingr_fpago, \n";
            sql = sql +  "        c.ding_fdocto, c1.edin_ccod, c1.edin_tdesc, cast(e.pers_nrut as varchar) + '-' + e.pers_xdv as rut_alumno, \n";
            sql = sql +  "        protic.obtener_nombre(f.pers_ncorr,'n') as nombre_apoderado,   \n";
            sql = sql +  "        (select ccte_tdesc from  cuentas_corrientes where ccte_ccod = a.ccte_ccod) ccte_tdesc, (select inen_tdesc from instituciones_envio where inen_ccod = a.inen_ccod) as inen_tdesc, cast(f.pers_tnombre as varchar) + ' ' + f.pers_tape_paterno as nombre_apoderado  \n";
            sql = sql +  "    from envios a,detalle_envios b,detalle_ingresos c,estados_detalle_ingresos c1, \n";
            sql = sql +  "    ingresos d,personas e,personas f \n";
            sql = sql +  "    where a.envi_ncorr = b.envi_ncorr \n";
            sql = sql +  "    and b.ting_ccod = c.ting_ccod   \n";
            sql = sql +  "    and b.ding_ndocto = c.ding_ndocto   \n";
            sql = sql +  "    and b.ingr_ncorr = c.ingr_ncorr \n";
            sql = sql +  "    and b.edin_ccod = c1.edin_ccod  \n";
            sql = sql +  "    and c.ingr_ncorr = d.ingr_ncorr \n";
            sql = sql +  "    and d.pers_ncorr = e.pers_ncorr \n";
            sql = sql +  "    and c.PERS_NCORR_CODEUDOR *= f.pers_ncorr \n";
            sql = sql +  "    and c.DING_NCORRELATIVO = 1 \n";
            sql = sql +  "    and cast(a.envi_ncorr as varchar) ='" + envio + "'";
            return (sql);
        }

        */
        private void Page_Load(object sender, System.EventArgs e)
        {
            string sql, envio, periodo;

            periodo = Request.QueryString["periodo"];
            envio = Request.QueryString["folio_envio"];
            //envio="97";
            //periodo="300";
            CrystalReport1 ListadoAgrupado = new CrystalReport1();
            sql = Crear_Consulta_Listado_Letras(envio,periodo);
            Response.Write(sql);
            //Response.Flush();
            oleDbDataAdapter1.SelectCommand.CommandText = sql;
            oleDbDataAdapter1.Fill(dataSet11);
            ListadoAgrupado.SetDataSource(dataSet11);
            CrystalReportViewer1.ReportSource = ListadoAgrupado;
            ExportarPDF(ListadoAgrupado);
        }
Beispiel #3
0
 public virtual ReportDocument CreateReport()
 {
     CrystalReport1 rpt = new CrystalReport1();
     rpt.Site = this.Site;
     return rpt;
 }