コード例 #1
0
 public void ShowErrorMessage()
 {
     ReportViewerPAGOS.LocalReport.DataSources.Clear();
     ReportViewerPAGOS.LocalReport.DataSources.Add(new ReportDataSource("", new DataTable()));
     ReportViewerPAGOS.LocalReport.ReportPath = Server.MapPath("~/" + "Reports//rpt//blank.rdlc");
     ReportViewerPAGOS.DataBind();
     ReportViewerPAGOS.LocalReport.Refresh();
 }
コード例 #2
0
        public void GenerateReportDocument(dynamic reportParm, string reportType, DataTable data)
        {
            string dsName = reportParm.DataSetName;

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