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