问题
Is it possible to do this kind of layout in SSRS?
2012/11/01
-----------------------------
| Order # | Product | Qty |
-----------------------------
| | Mouse | 3 |
| 1 | Keyboard | 2 |
| | CPU | 5 |
-----------------------------
| | Mouse | 1 |
| 2 | Keyboard | 7 |
| | Lan Cable | 7 |
-----------------------------
2012/11/02
-----------------------------
| Order # | Product | Qty |
-----------------------------
| | Mouse | 2 |
| | Keyboard | 8 |
| 3 | Memory | 4 |
| | CPU | 2 |
| | Battery | 1 |
-----------------------------
I tried finding a property that could do that, tried dragging the field on top too but to no avail :-)
回答1:
Yes you can do this, it's easiest if you nest two tablixes (a table inside a list). Make a list that groups on the date field. Inside the list place the table that groups rows on the order id. This would look like this:
----
2012/11/01 |
----------------------------- |
| Order # | Product | Qty | |
----------------------------- |
| | Mouse | 3 | |
| 1 | Keyboard | 2 | | --- List item 1
| | CPU | 5 | |
----------------------------- |
| | Mouse | 1 | |
| 2 | Keyboard | 7 | |
| | Lan Cable | 7 | |
----------------------------- |
----
----
2012/11/02 |
----------------------------- |
| Order # | Product | Qty | |
----------------------------- |
| | Mouse | 2 | | --- List item 2
| | Keyboard | 8 | |
| 3 | Memory | 4 | |
| | CPU | 2 | |
| | Battery | 1 | |
----------------------------- |
----
Alternatively you can make one big table:
- group rows on the date
- below that, group rows on the order id
- create a group header for the topmost group, merge the cells in the header, and display the date there
In this approach I'm not 100% sure if you can easily repeat the headers with each item in the date-group.
来源:https://stackoverflow.com/questions/13175589/is-it-possible-to-put-the-grouping-field-on-top-of-the-table-in-ssrs