문제

How can I get the aggregate information to appear in a matrix as in this example:

enter image description here

The query results are in a single row with columns representing each of the aggregate numbers.

도움이 되었습니까?

해결책

Assuming your data is something like this:

enter image description here

You can set up a Matrix object to display something similar to your requirements:

enter image description here

Here I dragged City and Item into the Matrix row and column field respectively, then added another Row Group based on Category and a Column Group based on Date.

The end result is practically the same as your requirement:

enter image description here

The big caveat here is that SSRS 2005 offers very limited options for customising a Matrix, i.e. things like adding new columns, but you can see the example report is pretty close so this is worth considering.

다른 팁

Report Design:

You can group by CITYID and instead of 1 detail line add 3 more detail and then put the corresponding field values.

With in the detail group right click the row and say add row within group and repeat it 3 times.

Database:

Other way is modify your dataset to break into four rows for each CITYID. Something Like

SELECT 'Delv' AS RowTag, Field1, Field2, Field3 FROM Table
UNION ALL
SELECT 'Sales' AS RowTag, Field4, Field5, Field6  FROM Table
UNION ALL
SELECT 'QOH' AS RowTag, Field7, Field8, Field9  FROM Table
UNION ALL
SELECT 'Diff' AS RowTag, Field10, Field11, Field12  FROM Table
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top