Example #1
0
        private void ReporteEscenarios()
        {
            string         rutatarget = ConfigurationManager.AppSettings["RutaReportes"].ToString();
            EscenarioRptBE entidad    = new EscenarioRptBE()
            {
                ID_MEDMIT = int.Parse(ddlMedMit_e.SelectedValue)
            };

            ConfigurarReporte();
            ReportViewer1.LocalReport.ReportPath = string.Format("{0}\\EscenarioRpt.rdlc", rutatarget);
            List <EscenarioRptBE> lbeReporte = EscenarioRptLN.ListaEscenariosRpt(entidad);

            ReportDataSource dataSource = new ReportDataSource("DsEscenario", lbeReporte);

            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(dataSource);
            ReportViewer1.ServerReport.Refresh();

            //string rutatarget = ConfigurationManager.AppSettings["RutaReportes"].ToString();
            //IniciativaRptBE entidad = new IniciativaRptBE() { ID_INICIATIVA = 0, ID_MEDMIT = int.Parse(ddlMedMit.SelectedValue), ID_SECTOR_INSTITUCION = 1 };

            //ConfigurarReporte();
            //ReportViewer1.LocalReport.ReportPath = string.Format("{0}\\rptIniciativa.rdlc", rutatarget);
            //List<IniciativaRptBE> lbeReporte = ReporteLN.ListaIniciativaRpt(entidad);

            //ReportDataSource dataSource = new ReportDataSource("DtIniciativa", lbeReporte);

            //ReportViewer1.LocalReport.DataSources.Clear();
            //ReportViewer1.LocalReport.DataSources.Add(dataSource);
            //ReportViewer1.ServerReport.Refresh();
        }
        private void ReporteEscenarios()
        {
            string         rutatarget = ConfigurationManager.AppSettings["RutaReportes"].ToString();
            EscenarioRptBE entidad    = new EscenarioRptBE()
            {
                ID_MEDMIT = 0
            };

            ConfigurarReporte();
            rvReporte.LocalReport.ReportPath = string.Format("{0}\\EscenarioRpt.rdlc", rutatarget);
            List <EscenarioRptBE> lbeReporte = EscenarioRptLN.ListaEscenariosRpt(entidad);

            ReportDataSource dataSource = new ReportDataSource("DsEscenario", lbeReporte);

            rvReporte.LocalReport.DataSources.Clear();
            rvReporte.LocalReport.DataSources.Add(dataSource);
            rvReporte.ServerReport.Refresh();
        }