SQL 报告 - 组内可以有组吗?
我正在尝试生成一个具有多个分组的报告,但不仅仅将组显示为正在分组的单个字段。 我认为最好用一个例子来展示:
> Date <- Grouped, broken by page
> Meeting type <- grouped
> Meeting_Time Meeting_Place Meeting_Title Meeting_Priority
> Agenda_item_1
> Agenda_item_2
> Agenda_item_3
> Agenda_item_4
> Meeting_Time Meeting_Place Meeting_Title Meeting_Priority
> Agenda_item_1
> Agenda_item_2
> Meeting_Time Meeting_Place Meeting_Title Meeting_Priority
> Agenda_item_1
> Agenda_item_2
> Agenda_item_3
这可以做到吗?如果可以,报表组件如何分组,数据集应该是什么样子?
I'm trying to produce a report that has multiple grouping but does not just show the group as the single field being grouped. I think it may be best shown with an example:
> Date <- Grouped, broken by page
> Meeting type <- grouped
> Meeting_Time Meeting_Place Meeting_Title Meeting_Priority
> Agenda_item_1
> Agenda_item_2
> Agenda_item_3
> Agenda_item_4
> Meeting_Time Meeting_Place Meeting_Title Meeting_Priority
> Agenda_item_1
> Agenda_item_2
> Meeting_Time Meeting_Place Meeting_Title Meeting_Priority
> Agenda_item_1
> Agenda_item_2
> Agenda_item_3
Can this be done, and if so, how are the report components grouped, and what should the DataSet look like?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定我完全理解你的意思,所以如果我有任何误解,请澄清。
您的数据集分组应该非常灵活。 如果您不确定如何处理数据,我建议在生成数据集时不要进行任何分组。
我想您的数据集将具有以下列:
Date、MeetingType、MeetingTime、MeetingPlace、MeetingTitle、MeetingPriority、AgendaItem
为了使其看起来像您所拥有的,您可以执行以下操作:
1.)向设计器添加一个表(6 列) )
2.) 删除页眉和页脚
3.) 在日期上添加一个组,在开始时检查没有页脚和分页符
4.) 将日期添加到第一列,合并1-6
5.) 在 MeetingType 上添加没有页脚的组
6.) 将会议类型添加到组 2 中的第 2 列并合并 2 - 6
7.) 在会议时间添加一个没有页脚的组(您确实应该在此处有一个 ID,或者如果名称是唯一的,则使用名称)
8.) 将 MeetingTime MeetingPlace MeetingTitle MeetingPriority 添加到第 3 组中的第 3、4、5、6 列(如果此处需要标题,请在上面添加一行,不要使用表格标题)
9.) 将 AgendaItem 添加到第 4 列
10.) 合并 4 - 6
剩下的只是格式化
I am not sure I entirely follow you, so please clarify if I am misunderstanding anything.
Your dataset grouping should be very flexible. If you are uncertain how the data will be handled, I recommend not doing any grouping in producing the dataset.
I imagine your data set would have the following columns:
Date, MeetingType, MeetingTime, MeetingPlace, MeetingTitle, MeetingPriority, AgendaItem
To make it look like you have, here's what you can do:
1.) Add a table to the designer (6 Columns)
2.) Remove the header and footer
3.) Add a group on Date with no footer and page break at start checked
4.) Add the date to the first column, merge 1-6
5.) Add a group on MeetingType with no footer
6.) Add meeting type to column 2 in group 2 and merge 2 - 6
7.) Add a group on meeting time with no footer (you really should have an ID here instead or use name if it is unique)
8.) Add MeetingTime MeetingPlace MeetingTitle MeetingPriority to columns 3, 4, 5, 6 in group 3 (add a row above if you need a header here, don't use the table header)
9.) Add AgendaItem to column 4
10.) Merge 4 - 6
The rest is just formatting