Reputation: 763
I'm making a report in Visual Studio 2008 that gets its dataset from an SQL database that is grouped two different ways, let's say by State
and City
, and the important column in question is Deposits
. As of now, I have placed the data in a table and added a subtotal of Deposits
for each city. Is it possible to add a subtotal for each State
, and then one huge grand total at the end of the report that totals the Deposit
for each State
into one number? Here's an example of how the table would look:
Alabama
Montgomery
Deposits
1000
500
Subtotal: 1500
Springfield
Deposits
1000
800
Subtotal: 1800
Total: 3300
Texas
Austin
Deposits
900
500
Subtotal: 1400
Dallas
Deposits
800
800
Subtotal: 1600
Total: 3000
Grand Total:6300
Upvotes: 0
Views: 2354
Reputation: 20560
Create two levels of grouping on your tablix, the first by State and the second by City. For the subtotals and grand total, in the group footers and the table footer put the following formula:
=Sum(Fields!Deposits.Value)
Reporting Services will do all the work for you.
Upvotes: 3