Пример #1
0
 public void ShowErrorMessage()
 {
     ReportViewer6.LocalReport.DataSources.Clear();
     ReportViewer6.LocalReport.DataSources.Add(new ReportDataSource("", new DataTable()));
     ReportViewer6.LocalReport.ReportPath = Server.MapPath("~/" + "Report//rpt//blank.rdlc");
     ReportViewer6.DataBind();
     ReportViewer6.LocalReport.Refresh();
 }
Пример #2
0
        public void GenerateReportDocument(dynamic reportParam, string reportType, DataTable data)
        {
            string dsName = reportParam.DataSetName;

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