Exemplo n.º 1
0
    public override void Abas_AntesDeTrocarAba(AbaBeforeChangedCancelEventArgs e)
    {
        base.Abas_AntesDeTrocarAba(e);

        if (e.IndiceDaAba == 3)
        {
            TelerikReport.Report1 dd = new TelerikReport.Report1();
            using (ContatoEstadoBLL bll = new ContatoEstadoBLL())
            {
                bll.Filters          = GetFilters();
                dd.DataSource        = bll.listaRelatorio();
                ReportViewer1.Report = dd;
                ReportViewer1.DataBind();
            }
        }

        if (e.IndiceDaAba == 4)
        {
            TelerikReport.Report3 dd = new TelerikReport.Report3();
            using (ContatoEstadoBLL bll = new ContatoEstadoBLL())
            {
                bll.Filters          = GetFilters();
                dd.DataSource        = bll.listaRelatorio();
                ReportViewer2.Report = dd;
                ReportViewer2.DataBind();
            }
        }
    }
Exemplo n.º 2
0
        protected void btnbuscar_Click2(object sender, EventArgs e)
        {
            string company, fechaini, fechafin;

            company = "";
            //usuario = "";
            fechafin = "";
            fechafin = "";
            company  = txtcompany3.Text.ToString();
            //usuario = txtUsuario.Text.ToString();
            fechaini = txtfechaini3.Text.ToString();
            fechafin = txtfechafin3.Text.ToString();
            ObtenerIndicadorNivelCumplimiento2(company, fechaini, fechafin);
            DataTable table = ConvertListToDataTable2(Indicadores2);

            ReportViewer2.Reset();

            ReportViewer2.LocalReport.ReportPath = Server.MapPath("~/Content/Report/Report2.rdlc");
            ReportDataSource rds = new ReportDataSource("DataSet1", table);

            ReportViewer2.LocalReport.DataSources.Clear();
            ReportViewer2.LocalReport.DataSources.Add(rds);
            ReportViewer2.DataBind();
            ReportViewer2.LocalReport.Refresh();
        }
Exemplo n.º 3
0
 public void ShowErrorMessage()
 {
     ReportViewer2.LocalReport.DataSources.Clear();
     ReportViewer2.LocalReport.DataSources.Add(new ReportDataSource("", new DataTable()));
     ReportViewer2.LocalReport.ReportPath = Server.MapPath("~/" + "Report//rpt//blank.rdlc");
     ReportViewer2.DataBind();
     ReportViewer2.LocalReport.Refresh();
 }
Exemplo n.º 4
0
        public void GenerateReportDocument(dynamic reportParam, string reportType, DataTable data)
        {
            string dsName = reportParam.DataSetName;

            ReportViewer2.LocalReport.DataSources.Clear();
            ReportViewer2.LocalReport.DataSources.Add(new ReportDataSource(dsName, data));
            ReportViewer2.LocalReport.ReportPath = Server.MapPath("~/" + "Report//rpt//" + reportParam.RptFileName);
            ReportViewer2.DataBind();
            ReportViewer2.LocalReport.Refresh();
        }