有关 rdlc 。列里的字符串太长,不能自动换行,如果列头固定的情况下。还会出现 列头和下面的 grid 错位的情况。解决方法如下:
比如有这个2个字符串 "SN20121080005","博客园程序员之家" 同是string 类型的字符串,同样设置相同宽度15mm 但效果却是 前者一直撑到字符串长度为止不换行,后者超过规定单元格长度后自动换行,本想要的效果是超过所有列超过设计规格后都自动换行。结果这个问题让页面布局变乱,打印预览时部分列会在第二页打印,或者出现第二页空白页的问题。找了很多办法,最重其实很简单
<div style="word-break:break-all;"> //word-break:break-all 会自动换行
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
Height="100%" InteractiveDeviceInfos="(集合)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
Width="100%">
<LocalReport ReportPath="SaleCenter\SaleHistoryReport_Print.rdlc">
</LocalReport>
</rsweb:ReportViewer>
</div>