![]() |
#2
恋树湿花2010-12-10 15:38
|
我不知道是我水平不行 还是我的耐心不够 vs2010 RDLC较05多了很多功能 也少了很多常用的属性 确实让人很不爽
但还是坚持做下去
运行报表的时候,有两种模式:设计预览模式和页面设置打印模式(自己取的名字,不专业)。发现设计预览模式和页面设置打印模式文字的大小、对其精密程度完全不一样,很多时候设计预览模式非常精美,但一进入页面设置打印模式整个报表的对齐程度、字体大小都有些不正常。
只有本站会员才能查看附件,请 登录
(例如俺这里用字体微软雅黑 同样的做法 为什么在05里正常 在2010就变成这个样子了)
只有本站会员才能查看附件,请 登录
很多属性找不到 比方说repeatonnewpage这么重要的属性居然没有 真是汗.....(到这里我真想摔鼠标了)
动态绑定代码 来说

vs2005的做法 value值设置 数据集_表名
ReportDataSourcev rds = new ReportDataSource();
rds.Name = "DsInfo_DataTable1";
rds.Value = dsReport.Tables[0];
reportViewer1.LocalReport.DataSources.Add(rds);
在vs2010 这套根本行不通 查了资料 要这样写 才可以
ReportDataSource rds = new ReportDataSource("DsInfo", dsReport.Tables[0]);
reportViewer1.LocalReport.DataSources.Add(rds);
reportViewer1.LocalReport.Refresh();
结论: 俺不想用vs2010做RDLC报表了 也许我水平差 很多都不懂 但还是要说vs2010这块整的太烂了 基本上用起来非常不顺手 我宁愿用vs2005 ReportDataSourcev rds = new ReportDataSource();
rds.Name = "DsInfo_DataTable1";
rds.Value = dsReport.Tables[0];
reportViewer1.LocalReport.DataSources.Add(rds);
在vs2010 这套根本行不通 查了资料 要这样写 才可以
ReportDataSource rds = new ReportDataSource("DsInfo", dsReport.Tables[0]);
reportViewer1.LocalReport.DataSources.Add(rds);
reportViewer1.LocalReport.Refresh();