参考例子:
https://blog.csdn.net/xiaochenXIHUA/article/details/122281087
经过学习总结和问题如下:
1. 该例子用到的引用除了Windows.Form之外,还有Microsoft.SqlServer.Types和Microsoft.ReportingServices.ReportViewerControl.Winforms。请在NuGet管理解决方案中下载安装;
2. 对个人来讲几点新技术:
- RDLC模板编辑;
- RDLC与DataTable绑定;
- ReportViewer页面设置;
3. 碰到的几个问题:
- RDLC中文乱码问题
-
<TextRuns> <TextRun> <Value>中文</Value> <Style> <FontWeight>Bold</FontWeight> </Style> </TextRun> </TextRuns>
ReportView PrinterViewer纵向设置
-
In the Report Properties dialog if you set Page width to 8.27in and Page height to 11.69in then the Page Setup dialog of ReportViewer defaults to A4.
In the Report Properties dialog if you set Page width to 11.69in and Page height to 8.27in then the Page Setup dialog of ReportViewer defaults to A4, and Orientation defaults to Landscape.