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

            ReportViewer5.LocalReport.DataSources.Clear();
            ReportViewer5.LocalReport.DataSources.Add(new ReportDataSource(dsName, data));
            ReportViewer5.LocalReport.ReportPath = Server.MapPath("~/" + "Report//rpt//" + reportParam.RptFileName);
            ReportViewer5.DataBind();
            ReportViewer5.LocalReport.Refresh();
        }
示例#3
0
        protected void btnbuscar4_Click(object sender, EventArgs e)
        {
            ObtenerIndicadorFueraPlazoTest();
            DataTable table = ConvertListToDataTable4(Indicadores4);

            ReportViewer5.Reset();

            ReportViewer5.LocalReport.ReportPath = Server.MapPath("~/Content/Report/Report4.rdlc");
            ReportDataSource rds = new ReportDataSource("DataSet", table);

            ReportViewer5.LocalReport.DataSources.Clear();
            ReportViewer5.LocalReport.DataSources.Add(rds);
            ReportViewer5.DataBind();
            ReportViewer5.LocalReport.Refresh();
        }