流逝の青春

导航

2013年4月14日 #

C# ReportViewer 绑定数据源

摘要: 在控件加载事件里写绑定数据源代码private void reportViewer1_Load(object sender, EventArgs e) { //定义数据源,这里用到前说的数据集名字“sunnyds”,这个名字比须和报表时添加的一样 ReportDataSource sourceTable = new ReportDataSource("sunnyds",(System.Data.DataTable)this.requestsTableAdapter.GetData()); ... 阅读全文

posted @ 2013-04-14 21:38 流逝の青春 阅读(884) 评论(0) 推荐(0) 编辑

C# ReportViewer 列筛选器

摘要: 从工具箱里拖出一个矩阵在设计报表的视图下方添加几个列组选择组属性添加筛选器,编写表达式。每列都可以有个筛选器。而不是一个矩阵一个筛选器 阅读全文

posted @ 2013-04-14 21:31 流逝の青春 阅读(282) 评论(0) 推荐(0) 编辑

2013年4月10日 #

C#利用word(模板)标签功能打印和form自带的打印功能

摘要: 利用word标签功能打印实现 public void DocumentPrint(Request request) { Microsoft.Office.Interop.Word.Application app = null; Microsoft.Office.Interop.Word.Document doc = null; object missing = System.Reflection.Missing.Value; object templateFile = @"D:\Downloa... 阅读全文

posted @ 2013-04-10 18:21 流逝の青春 阅读(1380) 评论(0) 推荐(0) 编辑

2013年4月9日 #

DataGridView通过右键选中行及更新Index

摘要: private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseButtons.Right) { if (e.RowIndex > -1) { if (!this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Selecte... 阅读全文

posted @ 2013-04-09 23:00 流逝の青春 阅读(304) 评论(0) 推荐(0) 编辑