简体   繁体   English

在SQL报告服务中直观地表示非规范化数据集

[英]Visually representing a denormalized dataset in SQL reporting services

I'm trying to take a denormalized data set and turn it into a report containing a horizontal table layout of data grouped and subgrouped. 我正在尝试使用非规范化数据集并将其转换为包含分组和子分组数据的水平表布局的报告。 I realize there are probably better ways to contain the data and better ways to visualize this data, but this is what I have to work with. 我意识到可能有更好的方法来包含数据和更好的方法来可视化这些数据,但这是我必须要处理的。

Here is the scenario... I have the following CustomerOrderDataTable: 这是场景......我有以下CustomerOrderDataTable:

在此输入图像描述

With the following data: 有以下数据:

在此输入图像描述

And I'm trying to get it to look like: 我试图让它看起来像:

在此输入图像描述

The one final requirement on this is to allow for jagged data groups, butting up against each other vertically like: 对此的最后一个要求是允许锯齿状数据组,相互垂直对接,如:

在此输入图像描述

For your first table you can do something like this. 对于你的第一张桌子,你可以做这样的事情。

Set a matrix with one column group, grouped on CustomerId : 设置一个包含一个列组的矩阵,在CustomerId分组:

在此输入图像描述

There are only two textboxes - one has CustomerName . 只有两个文本框 - 一个具有CustomerName Insert a table into the other textbox: 将表插入另一个文本框:

在此输入图像描述

在此输入图像描述

This embedded table is grouped on OrderId . 此嵌入表在OrderId上分组。 OrderDate is displayed in the group header and OrderItemName in the detail row. OrderDate显示在详细信息行的组标题和OrderItemName中。 Since this is embedded in the column group, the table will be repeated for each customer and only display rows in that Scope. 由于它嵌入在列组中,因此将为每个客户重复该表,并仅显示该范围中的行。

Final result looks like this based on your data: 根据您的数据,最终结果如下:

在此输入图像描述

Not 100% sure about the stacked grouping, but hopefully this will be of some use. 不是100%肯定堆叠分组,但希望这将有一些用处。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM