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

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