了解 SQL Reporting Services 2005 报表中的分组
我有页眉、正文和页脚部分,但我不知道如何向 Visual Studio 2005 中的 SQL Reporting Services 报表设计 (rdl) 添加其他“组”部分。
举个例子:我有一个数据集从员工中选择部门、员工薪资,按部门、员工排序
。我想制作一份报告,显示每个员工的工资以及部门和公司范围内的工资总额。
在类似的报表设计器中,我将通过在报表中的“部门”字段中定义分组来实现此目的。然后,我将有一个部门标题部分来删除部门字段的文本框,一个详细信息部分来删除员工和薪水字段的文本框,一个部门页脚部分来删除部门工资总额的文本框,最后是一个(报告)页脚部分放置一个文本框,用于显示所有员工工资的总和。
我在工具箱中找到了表控件 - 我可以创建与上面提到的部分定义相匹配的“行”,但表控件希望所有内容都紧密遵循它的行和列 - 我无法在部分中自由放置文本框,它必须精确调整自身大小以适合表中的一个单元格。这对于某些情况可能很好,但对我来说不是。
表控件是此处进行分组的唯一/正确方法,还是有办法扩展到页眉/正文/页脚部分之外?
I have a Page Header, Body and Page Footer section, but I can't figure out how to add additional 'group' sections to a SQL Reporting Services report design (rdl) in Visual Studio 2005.
Take this example: I have a dataset SELECT Department, Employee Salary FROM Employees ORDER BY Department, Employee
. I want to make a report showing each employee's salary along with department and company wide totals.
In similar report designers I would do this by defining a grouping in the report on the Department field. I would then have a Department Header section to drop a textbox for the department field, a Detail section to drop textboxes for the Employee and Salary fields, a Department Footer section to drop an textbox for the aggregate sum of the departments salary, and finally a (Report) Footer section to drop a textbox for the aggregate sum of all employees salary.
I have found the Table control in the toolbox - I can create "rows" which match the section definitions I mentioned above, but the table control wants everything to tightly follow it's rows and columns - I cannot freely drop a textbox in a section, it must exactly size itself to fit one cell in the table. This may be great for some situations, but not mine.
Is the Table control the only/correct way to do grouping here, or is there a way to expand beyond the Page Header/Body/Page Footer sections?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来这可以通过 List 控件来完成。
首先在报表正文中放置一个列表项。分配 DataSetName,然后分配分组值(在示例中为“部门”)。
然后将第二个列表项放入第一个列表项中 - 它必须作为子项删除,不能重叠。相同的数据集,但没有分组。
父列表中放置在子列表上方的所有内容均显示为页眉,而放置在子列表下方的所有内容均显示为页脚。
It seems this can be done with the List control.
First place a List item in the report body. Assigned the DataSetName and then assign the Grouping value (in the example 'Department').
Then place a second List item inside the first - it must be dropped as a child item, not overlapping. Same dataset, but no grouping.
Everything that is placed in the parent list above the child list appears as a header, while everything placed below appears as a footer.