Groups | Blog | Home
all groups > sql server reporting services > october 2005 >

sql server reporting services : Matrix - SubTotal not giving the total correctly


BALAJI K via SQLMonster.com
10/4/2005 1:52:11 PM
Hi All,

I have a simple Matrix Report

DC-1 DC-2
AA 10 20
BB 20 12
CC 30 55

When I add a subtotal to the report both (row and column) it result the total
of the first row or a column, something like this

DC-1 DC-2 Total
AA 10 20 10
BB 20 12 20
CC 30 55 30
Total 10 20 10

How do i solve this


--
Message posted via SQLMonster.com
Robert Bruckner [MSFT]
10/4/2005 7:31:48 PM
It seems like the matrix cell contains an expression like =Fields!Abc.Value.
Also, in report designer you should get a warning about a field used in a
matrix cell without aggregate function.

A matrix cell (and subtotal cell) will usually cover more than one data row
(after grouping). Using an expression like =Fields!Abc.Value will however
only return the first row (and this is what you see in the subtotal cells).
You need to change the cell expression to e.g. =Sum(Fields!Abc.Value)
Then, the subtotal cells will show the Sum of the values also.

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

BALAJI K via SQLMonster.com
10/5/2005 12:00:00 AM
Thanks Robert
it worked, I have a one more thing to do now , Say I need to show one more
row in my Matrix where I need to the Variance

Like this

DC-1 DC-2 Total
AA 10 20 10
BB 20 12 20
CC 30 55 30
Total 10 20 10
Variance (10 -Field!Rtotal.Value) (20 -Field!Rtotal.Value) (30-Field!Rtotal.
Value)

How do I achieve this

Balaji


[quoted text, click to view]


--
Message posted via SQLMonster.com
AddThis Social Bookmark Button