Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rlopez
Starting Member
18 Posts |
Posted - 2006-09-07 : 17:29:07
|
I have created a Matrix style Report in Visual Studio. However I am having trouble creating a subtotal under each column. The value that I have in each column is derived using the COUNT function and the report will not let me group on the aggregate column. Obviously this is because SQL does not you do the either, but what I am looking for is the simplest possible solution to this problem. Here is an example of what I have. In MS Access you can do this by creating a running sum on a text box.Items Sold 2000 2001 2002...........................................Bike 200 251 300Ball 129 145 187 - This comes from SELECTToy 100 124 138 COUNT()____________________________________________ I want to add a subtotal here |
|
Gopi Nath Muluka
Starting Member
22 Posts |
Posted - 2006-09-07 : 17:36:11
|
If you are using SQL Server 2005 try ROLLUP with GROUP BY |
|
|
|
|
|