I'm writing a report in VS 2005. I've got a matrix with dynamic columns, and I want a subtotal at the end of each row. I've right-clicked on the column group header and selected 'Subtotal', but for some reason it is only showing the amount from the first column in each row, not the total of all values across that row.
The title of the column that is grouped is based on an expression. I want to display only the columns for each month from a chosen time period (the user can choose any time period in a year, eg. Jan - Feb, Jul - Sept, anything). The stored procedure behind the matrix's dataset is functioning correctly. Here's the expression that sets the column title:
=Switch(Fields!lessonMonth.Value=1, "January", Fields!lessonMonth.Value=2, "February", Fields!lessonMonth.Value=3, "March", Fields!lessonMonth.Value=4, "April", Fields!lessonMonth.Value=5, "May", Fields!lessonMonth.Value=6, "June", Fields!lessonMonth.Value=7, "July", Fields!lessonMonth.Value=8, "August", Fields!lessonMonth.Value=9, "September", Fields!lessonMonth.Value=10, "October", Fields!lessonMonth.Value=11, "November", Fields!lessonMonth.Value=12, "December")
lessonMonth is a value returned by the stored procedure, and it also has the number of lessons carried out by a teacher for that month. So, an example of the type of data that could be returned is as follows (I choose 2 teachers from a drop-down list, and Jan - Feb as the time period. Teacher 36101 had no lessons in that time period):
Teacher # Lesson month Num of lessons
350 |
1 |
32 |
350 |
2 |
11 |
360 |
1 |
0 |
360 |
2 |
0 |
Any help would be great. Thanks