SSRS 报告中的静态行数和列数
我需要在 SSRS 中创建一个模仿旧手写报告的报告。始终有 14 行和 6 列。但是,有时用于报表的查询不会返回列或行的数据。在这种情况下,我想在其位置显示“--”。如何创建包含这些静态行和列的报告?
I need to create a report in SSRS that mimics an old hand written report. There will always be 14 rows and 6 columns. However, sometimes the query that is used for the report will not return data for a column or a row. In that case, I want to display "--" in its place. How would I create a report with these static rows and columns?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我使用 SSRS 的经验,在这种情况下,最好首先让您的数据看起来像您想要的那样。也就是说,创建一组有 6 列的数据,并且对于空行,有某种占位符或虚拟数据。然后,在 SSRS 中渲染时,相应地处理此占位符/虚拟数据,在您的情况下通过显示“--”。您可能需要执行某种时髦的逻辑来构建这些虚拟线、聚合逻辑等。但我发现在数据方面完成工作比在 SSRS 中更容易。
In my experience when using SSRS, in situations like this it is best to make your data look the way you want it first. That is to say, create a set of data that has 6 columns, and for the empty rows, have some sort of placeholder or dummy data. Then, when rendering in SSRS, handle this placeholder/dummy data accordingly, in your case by displaying "--". You might need to do some sort of funky logic to build these dummy lines, aggregate logic, etc. But I've found doing the work in the data side to be easier than in SSRS.