最近研究这个报表控件玩,功能算一般,问题到不少,边学习边总结。
Q: 导出PDF的时候中文显示为? ,如何导出中文?
A: 设置Control 的字体为中文字体(SimSun)就可以。
Q: 默认纸张设置总是Letter,如何设置默认纸张为A4横放?
A: 在Report Properties 里面的Layout tab中设置 Page Size 为 11.69in * 8.27in, 则某认为A4横放。 此处有一个BUG, 就是以厘米cm作为单位的时候没有效果。见http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=126378&SiteID=1 。 同样类似办法也可以设置为其他大小。
Q: 导出PDF出错:A call to PInvoke function 'Microsoft.ReportViewer.Common!Microsoft.ReportingServices.Rendering.ImageRenderer.CompositionPDF+WindowsGDIWrapper::GetGlyphIndicesW' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
A: 编译好就没有问题了。
Q: 我导出PDF后,每页之间会有一个空白页
A: 检查Body size是不是超出了Page Size