Adding a cross tab data source
The cross tab source type in the data source control is used for creating cross-tab reports. For example, given the following table and data:
ID | Year | Type | AMT |
---|---|---|---|
7 | 1999 | 1 | 23 |
8 | 1999 | 2 | 44 |
9 | 1999 | 3 | 55 |
10 | 2000 | 1 | 66 |
11 | 2000 | 2 | 77 |
12 | 2000 | 3 | 88 |
13 | 1999 | 1 | 11 |
You can pivot the data to show the years down the side and the types across the top:
Year | type 1 | type 2 | type 3 | Row Total |
---|---|---|---|---|
1999 | 34 | 44 | 55 | 133 |
2000 | 66 | 77 | 88 | 231 |
For year 1999 and type 1, there are two records in the base table, so the summarized pivoting data is 23+11=34.