【发布时间】:2012-06-16 03:35:59
【问题描述】:
我正在使用此行在报表查看器中显示复选框:
=IIf( Fields!Field1.Value, Chr(254), Chr(168))
但是当我将其转换为 PDF 时,Checked 的复选框不会显示在 PDF 中。
有人解决了吗?
我使用Wingdings字体,因为安装应用后不支持其他字体,例如Wingdings2。
非常感谢。
【问题讨论】:
标签: reportviewer rdlc
我正在使用此行在报表查看器中显示复选框:
=IIf( Fields!Field1.Value, Chr(254), Chr(168))
但是当我将其转换为 PDF 时,Checked 的复选框不会显示在 PDF 中。
有人解决了吗?
我使用Wingdings字体,因为安装应用后不支持其他字体,例如Wingdings2。
非常感谢。
【问题讨论】:
标签: reportviewer rdlc
显然这是一个常见问题,将在下一版本中修复。
也许您可以使用 √(Unicode 十六进制中的 221A)作为解决方法。
【讨论】:
我正在使用这段代码从 RDLC 渲染为 PDF。
var bytes = reportViewer.LocalReport.Render(
_reportRenderFormat, _deviceInfo, out mimeType, out encoding, out filenameExtension,
out streamids, out warnings);
获得显示的复选框的可靠方法是转到文本框中的占位符属性并选择HTML- Interpret HTML tags as styles。
然后,对于checked 复选框,使用此Expression:
="<font face=""Wingdings 2"" color=""green"">" & Chr(81) &"</font>" & "some other text"
对于unchecked,请使用expression
="<font face=""Wingdings 2"" color=""red"">" & Chr(163) &"</font>" & "some other text"
【讨论】: