Ultimately pfrog's suggestion is probably the best but can be fiddly to get right - I've used such techniques before.
Another option is to create a dummy line in your query with the desired total in it and potentially the other totals too, then turn off any totalling in the matrix. Use the Union All feature of T-SQL to achieve this. I'd suggest using a temporary table or a 'Common Table Expression' (CTE) to minimise the extra overhead of effectively running the same query twice.
Cheers
Chris
Main Topics
Browse All Topics





by: PFrogPosted on 2007-05-08 at 06:39:02ID: 19049729
I've not found a way of adding a row to the bottom of a matrix. however, you can add a seperate matrix below your existing one, and set the row grouping to =1, so that all records are totalled in a single row.
It will line up with your existing matrix, and will look like it is a genuine matrix footer.
However, it will only work if you are using sum, count or avg. If each matrix cell is a max or min then this won't work (depending on what you want your total row to show)