导出到 XLS 时的 SSRS 2005 矩阵和边框样式
SSRS (SQL Server Reporting Services 2005) 中的矩阵在导出到 XLS 时似乎存在某些边框样式问题(但不是 PDF 或 Web 视图;也许是其他格式,不确定?)。
例如:创建一个矩阵并将矩阵边框样式设置为 Black Solid 1px,但所有 4 个单元格的边框样式均为 Black None 1px。 通过 ASP.NET 控件查看时,它看起来是正确的。 但导出到 XLS 后,它会在所有标题单元格(列标题和行标题以及左上角单元格)甚至最右边的数据列周围创建边框。 但报告中间的所有单元格都正确地没有设置边框。
更新:
如果矩阵边框设置为“无”,则单元格上的边框不会显示在 XLS 中。 那么,如何在矩阵周围设置外边框,但不让它在导出到 Excel 时将“所有边”边框应用于接触矩阵边缘的每个单元格?
The Matrix in SSRS (SQL Server Reporting Services 2005) seems to have issues with certain the border styles when exporting to XLS (but not PDF or web view; maybe other formats, not sure?).
For example: Create a matrix and set the Matrix border style to Black Solid 1px, but all 4 of the cells to have a border style of Black None 1px. When viewed via the ASP.NET control, it looks correct. But after export to XLS, it creates borders around all of the header cells (column and row headers, and the top left cell), and even the right most data column. But all the cells in the middle of the report correctly have no border set.
Update:
If the Matrix borders are set to None, then the borders on the cells don't show up in XLS. So, how do you set an outer border around the Matrix, but not have it apply the 'all sides' border to every cell that touches the edge of the Matrix when exported to Excel?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这似乎是 SSRS 2005 Excel 渲染中的一个错误。 我已经能够通过将矩阵 BorderStyle 属性(左、右、上、下)的所有边显式设置为 Solid 来解决此问题。
另外,当您执行此操作时,将 BorderStyle.Default 属性设置为 Solid 或 None 似乎并不重要。 为其他侧显式设置的值将覆盖该默认值。
This seems to be a bug in SSRS 2005 Excel rendering. I've been able to fix this by explicitly setting all sides of the matrix BorderStyle property (Left, Right, Top, Bottom) to Solid.
Also, when you do this, it seems like setting the BorderStyle.Default property to Solid or None doesn't matter. The value explicitly set for the other sides overrides that Default value.
我在导出xls时遇到这个问题。 但这里有一个很酷的技巧来解决这个问题......!
在边框中使用自定义格式...已解决
I had this problem while exporting it to xls. but here is a cool trick to solve this....!
Use custom formating in borders...solved