Ejemplo n.º 1
0
        protected void btnReporte_Click(object sender, EventArgs e)
        {
            try //add trycatch
            {
                string rutatarget           = WebConfigurationManager.AppSettings["RutaReportes"].ToString();
                List <FichaMinamBE> listado = FichaMinamLN.ListaFichaMinam(new FichaMinamBE()
                {
                    ID_MEDMIT = int.Parse(ddlMedMit.SelectedValue), ANNO = int.Parse(ddlAnio.SelectedValue)
                });

                ReportDataSource dataSource = new ReportDataSource("DtFichaMinam", listado);
                ReportViewer1.ProcessingMode         = ProcessingMode.Local;
                ReportViewer1.LocalReport.ReportPath = string.Format("{0}\\rptFichaMinam.rdlc", rutatarget);
                ReportViewer1.LocalReport.DataSources.Clear();
                ReportViewer1.LocalReport.DataSources.Add(dataSource);

                if (listado != null)
                {
                    ReportViewer1.Visible = true;
                    ReportViewer1.LocalReport.Refresh();
                }
                else
                {
                    ReportViewer1.Visible = false;
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex);
            }
        }
Ejemplo n.º 2
0
 List <FichaParametroBE> LoadParametros()
 {
     return(FichaMinamLN.ListaFichaParametros(new FichaParametroBE()
     {
         ID_MEDMIT = int.Parse(ddlMedMit.SelectedValue), ID_ENFOQUE = 0
     }));
 }