-
WinForm rdlc 报表自定义datatable数据源
- public partial class _Default : System.Web.UI.Page
- {
-
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- FillDataToReport();
- }
- }
-
- public void FillDataToReport()
- {
-
- DataTable dt = new DataTable();
- dt.Columns.Add("studentID", typeof(int));
- dt.Columns.Add("studentName", typeof(string));
- dt.Columns.Add("password", typeof(string));
- dt.Rows.Add(1, "王伯仙", "001");
- dt.Rows.Add(2, "白云飘飘", "002");
- dt.Rows.Add(3, "小神仙", "003");
-
- this.ReportViewer1.LocalReport.ReportPath = "student.rdlc";
- this.ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("T_Student", dt));
-
- }
- }
-
相关阅读:
347. Top K Frequent Elements
437. Path Sum III
338. Counting Bits
337. House Robber III
494. Target Sum
416. Partition Equal Subset Sum
LINUX 使用grep命令查看某个指定时间段的日志
git 常用命令操作
Python之IDE工具下载安装及注册详解及创建项目
Python下载安装及验证
-
原文地址:https://www.cnblogs.com/xixim/p/4589159.html
Copyright © 2020-2023
润新知